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.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/s/query/cluster_cursor_manager.cpp b/src/mongo/s/query/cluster_cursor_manager.cpp
index 860327f6216..98cbb05f2b5 100644
--- a/src/mongo/s/query/cluster_cursor_manager.cpp
+++ b/src/mongo/s/query/cluster_cursor_manager.cpp
@@ -673,9 +673,10 @@ std::pair<Status, int> ClusterCursorManager::killCursorsWithMatchingSessions(
uassertStatusOK(mgr.killCursor(opCtx, getNamespaceForCursorId(id).get(), id));
};
- auto visitor = makeKillSessionsCursorManagerVisitor(opCtx, matcher, std::move(eraser));
- visitor(*this);
- return std::make_pair(visitor.getStatus(), visitor.getCursorsKilled());
+ auto bySessionCursorKiller = makeKillCursorsBySessionAdaptor(opCtx, matcher, std::move(eraser));
+ bySessionCursorKiller(*this);
+ return std::make_pair(bySessionCursorKiller.getStatus(),
+ bySessionCursorKiller.getCursorsKilled());
}
stdx::unordered_set<CursorId> ClusterCursorManager::getCursorsForSession(