diff options
author | Louis Williams <louis.williams@mongodb.com> | 2023-04-25 14:11:05 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-25 15:42:39 +0000 |
commit | 55877fcfb5e8ac0b23f65862cd1d2f9b439c07f6 (patch) | |
tree | 4226b83803d5d7faa7ff58dcfb3fb00c583f3c37 /src/mongo/db/update | |
parent | 24f7e2e1596c0032bc30c2ec03e33f79d31a2e95 (diff) | |
download | mongo-55877fcfb5e8ac0b23f65862cd1d2f9b439c07f6.tar.gz |
SERVER-70338 Abandon snapshot while holding locks during query yield
* Alters the Locker contract to require callers to check if they can yield locks before yielding
* Reverses the ordering of yielding such that the snapshot is released before releasing locks
* Refactors the PlanYieldPolicy to allow it to override the requested YieldPolicy if necessary
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r-- | src/mongo/db/update/update_util.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/db/update/update_util.cpp b/src/mongo/db/update/update_util.cpp index 90f41da7dd1..80254801185 100644 --- a/src/mongo/db/update/update_util.cpp +++ b/src/mongo/db/update/update_util.cpp @@ -165,9 +165,7 @@ void makeUpdateRequest(OperationContext* opCtx, requestOut->setMulti(false); requestOut->setExplain(explain); - requestOut->setYieldPolicy(opCtx->inMultiDocumentTransaction() - ? PlanYieldPolicy::YieldPolicy::INTERRUPT_ONLY - : PlanYieldPolicy::YieldPolicy::YIELD_AUTO); + requestOut->setYieldPolicy(PlanYieldPolicy::YieldPolicy::YIELD_AUTO); } } // namespace update |