summaryrefslogtreecommitdiff
path: root/src/mongo/db/cursor_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/cursor_manager.cpp')
-rw-r--r--src/mongo/db/cursor_manager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp
index cac5d43de1d..6cfc442ed67 100644
--- a/src/mongo/db/cursor_manager.cpp
+++ b/src/mongo/db/cursor_manager.cpp
@@ -593,7 +593,11 @@ StatusWith<ClientCursorPin> CursorManager::pinCursor(OperationContext* opCtx,
// We use pinning of a cursor as a proxy for active, user-initiated use of a cursor. Therefor,
// we pass down to the logical session cache and vivify the record (updating last use).
if (cursor->getSessionId()) {
- LogicalSessionCache::get(opCtx)->vivify(opCtx, cursor->getSessionId().get());
+ auto vivifyCursorStatus =
+ LogicalSessionCache::get(opCtx)->vivify(opCtx, cursor->getSessionId().get());
+ if (!vivifyCursorStatus.isOK()) {
+ return vivifyCursorStatus;
+ }
}
return ClientCursorPin(opCtx, cursor);