[SERVER-65736] Backport changes to mongo shell to permit ".allowDiskUse(false)" Created: 18/Apr/22  Updated: 21/Apr/22  Resolved: 19/Apr/22

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

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Romans Kasperovics
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backport Requested:
v4.4
Participants:

 Description   

As part of related ticket SERVER-63208 we changed the behavior of the allowDiskUse() shell helper. It used to be that allowDiskUse() was a no-arguments function which always set allowDiskUse:true on the find command. Now, if an argument is provided, this gets passed through to the server as the value of the allowDiskUse option. In other words, now you can do something like this in the legacy shell:

db.myCollection.find().sort({foo: 1}).allowDiskUse(false);

This confusingly used to result in passing allowDiskUse:true to the server, but now it will pass allowDiskUse:false as you might expect.

The work for this ticket is to backport this part of the change from SERVER-63208 to the 5.0 branch, and possibly to older branches as well.


Generated at Thu Feb 08 06:03:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.