diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2022-12-04 01:07:01 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-05 10:15:17 +0000 |
commit | ba09304723cd67b1670da2a4fd8a7ae73de78c45 (patch) | |
tree | 3b33afcc60f8aafe40821710aca9b74d6980285c | |
parent | 9a8b65254522957f7445d6471071093b6cc684be (diff) | |
download | mongo-ba09304723cd67b1670da2a4fd8a7ae73de78c45.tar.gz |
SERVER-71759 dataSize command doesn't yield
(cherry picked from commit 62c6074e3342169809d5c01fd62452c082667c88)
(cherry picked from commit 8109b02976404d3c5d4f7b3d067ab7d54b612ecd)
(cherry picked from commit fe7b2dcce82c71dc4f4e6d7aa776bb50ee5d7484)
-rw-r--r-- | src/mongo/db/commands/dbcommands.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index 228b206da51..262974fc507 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -467,7 +467,7 @@ public: result.append("millis", timer.millis()); return 1; } - exec = InternalPlanner::collectionScan(opCtx, ns, collection, PlanExecutor::NO_YIELD); + exec = InternalPlanner::collectionScan(opCtx, ns, collection, PlanExecutor::YIELD_AUTO); } else if (min.isEmpty() || max.isEmpty()) { errmsg = "only one of min or max specified"; return false; @@ -497,7 +497,7 @@ public: min, max, BoundInclusion::kIncludeStartKeyOnly, - PlanExecutor::NO_YIELD); + PlanExecutor::YIELD_AUTO); } long long avgObjSize = collection->dataSize(opCtx) / numRecords; |