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/text.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/text.cpp')
-rw-r--r-- | src/mongo/db/exec/text.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/exec/text.cpp b/src/mongo/db/exec/text.cpp index 60441eb2a81..d06f302e43b 100644 --- a/src/mongo/db/exec/text.cpp +++ b/src/mongo/db/exec/text.cpp @@ -109,6 +109,7 @@ namespace mongo { } void TextStage::saveState() { + _txn = NULL; ++_commonStats.yields; for (size_t i = 0; i < _scanners.size(); ++i) { @@ -117,6 +118,7 @@ namespace mongo { } void TextStage::restoreState(OperationContext* opCtx) { + invariant(_txn == NULL); _txn = opCtx; ++_commonStats.unyields; |