diff options
author | Mathias Stearn <mathias@10gen.com> | 2015-07-06 19:16:30 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2015-07-16 14:37:02 -0400 |
commit | b9d2e18ca68246e5d21ed42a846ff4094867f159 (patch) | |
tree | cdbbac6dc5ee00404cf6452f5dd70612983127e3 /src/mongo/db/commands/repair_cursor.cpp | |
parent | c832bc753c29f91597b75fa02c0d9019c3c20b0f (diff) | |
download | mongo-b9d2e18ca68246e5d21ed42a846ff4094867f159.tar.gz |
SERVER-17364 Don't stash RecoveryUnits across getMores
We now tell PlanExecutors to detach from their OperationContexts and to shed
all storage engine resources before stashing the ClientCursor. This is a
heavier weight operation than a normal save/restoreState which is no longer
allowed to change the OperationContext.
Diffstat (limited to 'src/mongo/db/commands/repair_cursor.cpp')
-rw-r--r-- | src/mongo/db/commands/repair_cursor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/commands/repair_cursor.cpp b/src/mongo/db/commands/repair_cursor.cpp index eef18cfcfeb..5f2f88c04ca 100644 --- a/src/mongo/db/commands/repair_cursor.cpp +++ b/src/mongo/db/commands/repair_cursor.cpp @@ -103,11 +103,15 @@ public: // it now so that it can be registed with ClientCursor. exec->deregisterExec(); exec->saveState(); + exec->detachFromOperationContext(); // ClientCursors' constructor inserts them into a global map that manages their // lifetimes. That is why the next line isn't leaky. ClientCursor* cc = - new ClientCursor(collection->getCursorManager(), exec.release(), ns.ns()); + new ClientCursor(collection->getCursorManager(), + exec.release(), + ns.ns(), + txn->recoveryUnit()->isReadingFromMajorityCommittedSnapshot()); appendCursorResponseObject(cc->cursorid(), ns.ns(), BSONArray(), &result); |