diff options
author | Jason Rassi <rassi@10gen.com> | 2014-11-04 11:44:52 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-11-04 11:47:33 -0500 |
commit | 7849434abe5c8c24c7dd6dc7e664ebf1069c2557 (patch) | |
tree | f31b7da7541a436efae36f4c9f2ba87fd4644025 /src/mongo/db/query | |
parent | f91d3efd69a154d46a73caf2e6b5a5f632b56061 (diff) | |
download | mongo-7849434abe5c8c24c7dd6dc7e664ebf1069c2557.tar.gz |
SERVER-15541 Clean up some usages of WriteUnitOfWork
Removes some WriteUnitOfWork objects where they are unneeded, and
moves the declaration of some existing WriteUnitOfWork objects to
limit their scope to the write being performed (so that
yield-capable reads are not inside them).
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r-- | src/mongo/db/query/plan_yield_policy.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_yield_policy.cpp b/src/mongo/db/query/plan_yield_policy.cpp index 7aa624d6ee9..fdf909152cc 100644 --- a/src/mongo/db/query/plan_yield_policy.cpp +++ b/src/mongo/db/query/plan_yield_policy.cpp @@ -42,6 +42,7 @@ namespace mongo { _planYielding(exec) { } bool PlanYieldPolicy::shouldYield() { + invariant(!_planYielding->getOpCtx()->lockState()->inAWriteUnitOfWork()); return _elapsedTracker.intervalHasElapsed(); } |