summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/find_common.h
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2019-01-23 15:52:32 -0500
committerJason Carey <jcarey@argv.me>2019-02-07 18:01:42 -0500
commit4d703e26c2801971d538f948a4dc3191994f0074 (patch)
treeb01a03e75298bb277e12febc35f067124a93b65a /src/mongo/db/query/find_common.h
parent1c61ba3c31850721b73df871feb0f38f217a61a1 (diff)
downloadmongo-4d703e26c2801971d538f948a4dc3191994f0074.tar.gz
SERVER-39149 Homogenize getMore behavior
Cursor's have subtly different semantics across mongos and mongod and between legacy getMore and command getMore. (as does the find command) Ensuring that all getMores can be paused by waitAfterPinningCursorBeforeGetMoreBatch, and that cursors are cleaned up if they are killed after verifying auth, makes testing a bit simpler and cursors less leaky And adding a check for waitInFindBeforeMakingBatch to runQuery similarly makes it easier to test
Diffstat (limited to 'src/mongo/db/query/find_common.h')
-rw-r--r--src/mongo/db/query/find_common.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/query/find_common.h b/src/mongo/db/query/find_common.h
index 4dfa751a110..ca4111dd754 100644
--- a/src/mongo/db/query/find_common.h
+++ b/src/mongo/db/query/find_common.h
@@ -63,11 +63,15 @@ MONGO_FAIL_POINT_DECLARE(waitInFindBeforeMakingBatch);
// tests.
MONGO_FAIL_POINT_DECLARE(disableAwaitDataForGetMoreCmd);
-// Enabling this fail point will cause the getMore command to busy wait after pinning the cursor
+// Enabling this fail point will cause getMores to busy wait after pinning the cursor
// but before we have started building the batch, until the fail point is disabled.
MONGO_FAIL_POINT_DECLARE(waitAfterPinningCursorBeforeGetMoreBatch);
-// Enabling this failpoint will cause the getMore to wait just before it unpins its cursor after it
+// Enabling this fail point will cause getMores to busy wait after setting up the plan executor and
+// before beginning the batch.
+MONGO_FAIL_POINT_DECLARE(waitWithPinnedCursorDuringGetMoreBatch);
+
+// Enabling this failpoint will cause getMores to wait just before it unpins its cursor after it
// has completed building the current batch.
MONGO_FAIL_POINT_DECLARE(waitBeforeUnpinningOrDeletingCursorAfterGetMoreBatch);