summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2018-04-30 12:54:34 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2018-05-15 09:22:58 -0400
commitfa9278c892a6833694983191a5726b20f6a187a0 (patch)
tree3ef2ffc47c32a962d04507c127d2487485317041 /src/mongo/db/clientcursor.cpp
parenta9ba9539c5042911f030a1d4b3e4ce8ff0a449fc (diff)
downloadmongo-fa9278c892a6833694983191a5726b20f6a187a0.tar.gz
SERVER-33959 Avoid deadlock during global cursor registration
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index f960afc60d7..200a128b664 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -204,7 +204,8 @@ void ClientCursorPin::release() {
deleteUnderlying();
} else {
// Unpin the cursor under the collection cursor manager lock.
- _cursor->_cursorManager->unpin(_opCtx, _cursor);
+ _cursor->_cursorManager->unpin(
+ _opCtx, std::unique_ptr<ClientCursor, ClientCursor::Deleter>(_cursor));
cursorStatsOpenPinned.decrement();
}