diff options
author | Jason Carey <jcarey@argv.me> | 2019-03-05 10:47:33 -0500 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2019-03-11 10:26:49 -0400 |
commit | 1659623793b9d337e4061fc294ec258c99b1171e (patch) | |
tree | 592a21f84eb6bbbf8ca025bd04b7ccee89dc6db1 /src/mongo/transport/baton_asio_linux.h | |
parent | be65d84da8e84ea99a1075339bd49a23a688d756 (diff) | |
download | mongo-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/transport/baton_asio_linux.h')
-rw-r--r-- | src/mongo/transport/baton_asio_linux.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/transport/baton_asio_linux.h b/src/mongo/transport/baton_asio_linux.h index 1b6eb98db4f..c07ce5b32f4 100644 --- a/src/mongo/transport/baton_asio_linux.h +++ b/src/mongo/transport/baton_asio_linux.h @@ -394,11 +394,8 @@ private: { 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; |