diff options
author | Jason Rassi <rassi@10gen.com> | 2014-10-20 17:09:18 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-11-20 12:52:25 -0500 |
commit | 5c9b4a636753e98de0ba7d9d518bfb6516f843d7 (patch) | |
tree | 8faaecb08403afb14f49e33a734a43e6b99a8742 /src/mongo/db/exec/index_scan.cpp | |
parent | 4c221b5ce50c3eaabc0348432b6df6c41aeabee5 (diff) | |
download | mongo-5c9b4a636753e98de0ba7d9d518bfb6516f843d7.tar.gz |
SERVER-15675 Stages should clear their OperationContext in saveState()
While state is saved, threads pass in their own OperationContext to
invalidate(). When state is restored, the stage will resume with the
OperationContext passed in to restoreState().
Diffstat (limited to 'src/mongo/db/exec/index_scan.cpp')
-rw-r--r-- | src/mongo/db/exec/index_scan.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp index b6cb55d54d9..06e821f14ed 100644 --- a/src/mongo/db/exec/index_scan.cpp +++ b/src/mongo/db/exec/index_scan.cpp @@ -242,6 +242,7 @@ namespace mongo { } void IndexScan::saveState() { + _txn = NULL; ++_commonStats.yields; if (HIT_END == _scanState || INITIALIZING == _scanState) { return; } @@ -253,6 +254,7 @@ namespace mongo { } void IndexScan::restoreState(OperationContext* opCtx) { + invariant(_txn == NULL); _txn = opCtx; ++_commonStats.unyields; |