diff options
author | samantharitter <samantha.ritter@10gen.com> | 2017-10-18 18:11:25 -0400 |
---|---|---|
committer | samantharitter <samantha.ritter@10gen.com> | 2017-11-01 12:47:44 -0400 |
commit | 7cd8508b06e1574bea211dff054855b70b7cc20e (patch) | |
tree | fa2767c3cccbd8ac3fecb004526f9200f440ac43 /src/mongo/db/cursor_manager.cpp | |
parent | ef8db41490338502892d2e546e9a745d529ad614 (diff) | |
download | mongo-7cd8508b06e1574bea211dff054855b70b7cc20e.tar.gz |
SERVER-31565 Add stats about logical sessions background jobs to serverStatus
Diffstat (limited to 'src/mongo/db/cursor_manager.cpp')
-rw-r--r-- | src/mongo/db/cursor_manager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp index 392b0891697..0b85ccee4ed 100644 --- a/src/mongo/db/cursor_manager.cpp +++ b/src/mongo/db/cursor_manager.cpp @@ -317,15 +317,16 @@ std::vector<GenericCursor> CursorManager::getAllCursors(OperationContext* opCtx) return cursors; } -Status CursorManager::killCursorsWithMatchingSessions(OperationContext* opCtx, - const SessionKiller::Matcher& matcher) { +std::pair<Status, int> CursorManager::killCursorsWithMatchingSessions( + OperationContext* opCtx, const SessionKiller::Matcher& matcher) { auto eraser = [&](CursorManager& mgr, CursorId id) { uassertStatusOK(mgr.eraseCursor(opCtx, id, true)); }; auto visitor = makeKillSessionsCursorManagerVisitor(opCtx, matcher, std::move(eraser)); globalCursorIdCache->visitAllCursorManagers(opCtx, &visitor); - return visitor.getStatus(); + + return std::make_pair(visitor.getStatus(), visitor.getCursorsKilled()); } std::size_t CursorManager::timeoutCursorsGlobal(OperationContext* opCtx, Date_t now) { |