summaryrefslogtreecommitdiff
path: root/src/mongo/db/default_baton.cpp
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2019-03-05 10:47:33 -0500
committerJason Carey <jcarey@argv.me>2019-03-11 10:26:49 -0400
commit1659623793b9d337e4061fc294ec258c99b1171e (patch)
tree592a21f84eb6bbbf8ca025bd04b7ccee89dc6db1 /src/mongo/db/default_baton.cpp
parentbe65d84da8e84ea99a1075339bd49a23a688d756 (diff)
downloadmongo-1659623793b9d337e4061fc294ec258c99b1171e.tar.gz
SERVER-39960 Simplify opCtx::markKilled
Operation context currently relies on an elaborate dance between the client lock, _waitMutex, _waitCV and _numKillers to allow markKilled to tap the condvar an opctx is waiting on. After the introduction of batons on all opctx's, this is no longer necessary (as batons have their own support for being woken, while waiting on a condvar). Removing the special killing code will simplify opctx, and remove a lot of extra book keeping.
Diffstat (limited to 'src/mongo/db/default_baton.cpp')
-rw-r--r--src/mongo/db/default_baton.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/default_baton.cpp b/src/mongo/db/default_baton.cpp
index 8aeef1bec64..1154d377ccb 100644
--- a/src/mongo/db/default_baton.cpp
+++ b/src/mongo/db/default_baton.cpp
@@ -57,11 +57,8 @@ void DefaultBaton::detachImpl() noexcept {
{
stdx::lock_guard<stdx::mutex> lk(_mutex);
- {
- stdx::lock_guard<Client> lk(*_opCtx->getClient());
- invariant(_opCtx->getBaton().get() == this);
- _opCtx->setBaton(nullptr);
- }
+ invariant(_opCtx->getBaton().get() == this);
+ _opCtx->setBaton(nullptr);
_opCtx = nullptr;
_hasIngressSocket = false;