summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/killcursors_cmd.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2019-01-30 14:23:54 -0500
committerDavid Storch <david.storch@10gen.com>2019-01-31 08:31:49 -0500
commit5ee0b3805e9116bf0f4655d5ee5cd5b108e7a7e4 (patch)
tree13c1b78a5b03c6d2788228d6081fef096eb179d0 /src/mongo/db/commands/killcursors_cmd.cpp
parent4b55effde2d01fa84141f02203a0433a6a4d58f2 (diff)
downloadmongo-5ee0b3805e9116bf0f4655d5ee5cd5b108e7a7e4.tar.gz
SERVER-39065 Delete withCursorManager() and visitAllCursorManagers().
Diffstat (limited to 'src/mongo/db/commands/killcursors_cmd.cpp')
-rw-r--r--src/mongo/db/commands/killcursors_cmd.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/mongo/db/commands/killcursors_cmd.cpp b/src/mongo/db/commands/killcursors_cmd.cpp
index 74d61b1ebdc..6efecd22edc 100644
--- a/src/mongo/db/commands/killcursors_cmd.cpp
+++ b/src/mongo/db/commands/killcursors_cmd.cpp
@@ -67,11 +67,7 @@ public:
private:
Status _checkAuth(Client* client, const NamespaceString& nss, CursorId id) const final {
auto opCtx = client->getOperationContext();
- const auto check = [opCtx, id](CursorManager* manager) {
- return manager->checkAuthForKillCursors(opCtx, id);
- };
-
- return CursorManager::withCursorManager(opCtx, id, nss, check);
+ return CursorManager::getGlobalCursorManager()->checkAuthForKillCursors(opCtx, id);
}
Status _killCursor(OperationContext* opCtx,
@@ -87,10 +83,8 @@ private:
dbProfilingLevel);
}
- return CursorManager::withCursorManager(
- opCtx, id, nss, [opCtx, id](CursorManager* manager) {
- return manager->killCursor(opCtx, id, true /* shouldAudit */);
- });
+ auto cursorManager = CursorManager::getGlobalCursorManager();
+ return cursorManager->killCursor(opCtx, id, true /* shouldAudit */);
}
} killCursorsCmd;