summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2018-10-11 12:04:32 -0400
committerTed Tuckman <ted.tuckman@mongodb.com>2018-10-11 16:17:50 -0400
commit480af6017647716bd2d087c6d772ef44db47c4cc (patch)
tree670f275a99e07fe72833f824ae5aeb3be4bd01af /src
parent2596d96f4a826777d7210b94d46a5b36aebfd15b (diff)
downloadmongo-480af6017647716bd2d087c6d772ef44db47c4cc.tar.gz
SERVER-28604 Log when a cursor is reaped for timeout
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/cursor_manager.cpp2
-rw-r--r--src/mongo/s/query/cluster_cursor_manager.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp
index 17aa13a65fb..139a1e7eb67 100644
--- a/src/mongo/db/cursor_manager.cpp
+++ b/src/mongo/db/cursor_manager.cpp
@@ -511,6 +511,8 @@ std::size_t CursorManager::timeoutCursors(OperationContext* opCtx, Date_t now) {
// Be careful not to dispose of cursors while holding the partition lock.
for (auto&& cursor : toDisposeWithoutMutex) {
+ log() << "Cursor id " << cursor->cursorid() << " timed out, idle since "
+ << cursor->getLastUseDate();
cursor->dispose(opCtx);
}
return toDisposeWithoutMutex.size();
diff --git a/src/mongo/s/query/cluster_cursor_manager.cpp b/src/mongo/s/query/cluster_cursor_manager.cpp
index ad270564fd3..73c46c210f7 100644
--- a/src/mongo/s/query/cluster_cursor_manager.cpp
+++ b/src/mongo/s/query/cluster_cursor_manager.cpp
@@ -485,7 +485,7 @@ std::size_t ClusterCursorManager::killMortalCursorsInactiveSince(OperationContex
!entry.getOperationUsingCursor() && entry.getLastActive() <= cutoff;
if (res) {
- log() << "Marking cursor id " << cursorId << " for deletion, idle since "
+ log() << "Cursor id " << cursorId << " timed out, idle since "
<< entry.getLastActive().toString();
}