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/count_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/count_scan.cpp')
-rw-r--r-- | src/mongo/db/exec/count_scan.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/exec/count_scan.cpp b/src/mongo/db/exec/count_scan.cpp index cff8b4ccaaa..09d4b098d1d 100644 --- a/src/mongo/db/exec/count_scan.cpp +++ b/src/mongo/db/exec/count_scan.cpp @@ -148,6 +148,7 @@ namespace mongo { } void CountScan::saveState() { + _txn = NULL; ++_commonStats.yields; if (_hitEnd || (NULL == _btreeCursor.get())) { return; } @@ -156,6 +157,7 @@ namespace mongo { } void CountScan::restoreState(OperationContext* opCtx) { + invariant(_txn == NULL); _txn = opCtx; ++_commonStats.unyields; if (_hitEnd || (NULL == _btreeCursor.get())) { return; } |