summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_cursor_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/query/cluster_cursor_manager.cpp')
-rw-r--r--src/mongo/s/query/cluster_cursor_manager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/s/query/cluster_cursor_manager.cpp b/src/mongo/s/query/cluster_cursor_manager.cpp
index f42465e845d..cbfebdb5d80 100644
--- a/src/mongo/s/query/cluster_cursor_manager.cpp
+++ b/src/mongo/s/query/cluster_cursor_manager.cpp
@@ -319,7 +319,11 @@ StatusWith<ClusterCursorManager::PinnedCursor> ClusterCursorManager::checkOutCur
// We use pinning of a cursor as a proxy for active, user-initiated use of a cursor. Therefore,
// we pass down to the logical session cache and vivify the record (updating last use).
if (cursor->getLsid()) {
- LogicalSessionCache::get(opCtx)->vivify(opCtx, cursor->getLsid().get());
+ auto vivifyCursorStatus =
+ LogicalSessionCache::get(opCtx)->vivify(opCtx, cursor->getLsid().get());
+ if (!vivifyCursorStatus.isOK()) {
+ return vivifyCursorStatus;
+ }
}
cursor->reattachToOperationContext(opCtx);