[SERVER-58808] Deprecate the find command's singleBatch option Created: 23/Jul/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Eric Cox (Inactive) Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-57461 Remove SPLIT_LIMITED_SORT and associa... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

As part of the work done in SERVER-57461 we realized that `singleBatch` in the find command is also a legacy concept. We want to remove `singleBatch` but we can't remove `singleBatch` unless we deprecate the use of negative limit first because drivers use `singleBatch` to implement negative limit semantics,

https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/message.py#L201-L204

After we deprecate negative limit support we can remove `singleBatch`  from the find command and elsewhere in the codebase.



 Comments   
Comment by David Storch [ 28/Jul/21 ]

Sounds good. Let's leave singleBatch alone in both the server and drivers for the foreseeable future. I will leave this SERVER ticket open but on the backlog.

Comment by Bernie Hackett [ 28/Jul/21 ]

I don't have a strong desire to get rid of singleBatch. I'm just not convinced negative limit is a commonly used feature and was under the impression removing singleBatch was important to the query team. If it's easy to keep singleBatch around I'm happy to keep supporting negative limit in drivers.

Comment by David Storch [ 28/Jul/21 ]

behackett, I personally don't see a strong reason to prioritize this on the server side. Although the singleBatch option is a bit odd, it's very easy for us to continue supporting (and it doesn't preclude removing ntoreturn or other OP_QUERY-specific concepts). Does the drivers team see a motivation for deprecating singleBatch? If the drivers team wants to deprecated it on the drivers side, then we can schedule work to mark it as deprecated in the docs and server as well. In the meantime, I am putting this ticket on the backlog.

Comment by David Storch [ 27/Jul/21 ]

I'm not sure that we will do this as part of the legacy op codes removal project, so I'm flagging for triage. This seems like a separate effort, since it depends on changes to the drivers. I'm also not sure it's even worth doing, since singleBatch is super easy for us to keep supporting.

Generated at Thu Feb 08 05:45:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.