summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/find_cmd.cpp
diff options
context:
space:
mode:
authorRomans Kasperovics <romans.kasperovics@mongodb.com>2022-04-12 16:43:51 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-12 22:54:31 +0000
commitf285f0af3d8d1448db1abafcaf4506a96af9e511 (patch)
tree4b72f79e7899358c8a882588ccf4017ff41354d7 /src/mongo/db/commands/find_cmd.cpp
parentfd75059c83cfa4be0225bd03b9c96a21aea39887 (diff)
downloadmongo-f285f0af3d8d1448db1abafcaf4506a96af9e511.tar.gz
SERVER-63208 Make allowDiskUse opt-out rather than opt-in
Diffstat (limited to 'src/mongo/db/commands/find_cmd.cpp')
-rw-r--r--src/mongo/db/commands/find_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp
index 83f8e864648..fc81cb6904d 100644
--- a/src/mongo/db/commands/find_cmd.cpp
+++ b/src/mongo/db/commands/find_cmd.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/commands/test_commands_enabled.h"
#include "mongo/db/cursor_manager.h"
#include "mongo/db/db_raii.h"
+#include "mongo/db/exec/disk_use_options_gen.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/fle_crud.h"
#include "mongo/db/matcher/extensions_callback_real.h"
@@ -158,7 +159,7 @@ boost::intrusive_ptr<ExpressionContext> makeExpressionContext(
verbosity,
false, // fromMongos
false, // needsMerge
- findCommand.getAllowDiskUse(),
+ findCommand.getAllowDiskUse().value_or(allowDiskUseByDefault.load()),
false, // bypassDocumentValidation
false, // isMapReduceCommand
findCommand.getNamespaceOrUUID().nss().value_or(NamespaceString()),