diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2017-11-02 09:53:31 -0400 |
---|---|---|
committer | Sara Golemon <sara.golemon@mongodb.com> | 2017-11-30 14:43:49 -0500 |
commit | d75b113186e1914a5f2dc6d1983d604324a8f7f1 (patch) | |
tree | 70456067423a5cae9387beab80a149d29728745b /src/mongo/db/cursor_manager.h | |
parent | 3607059cd791b273ccaefd879d765dcd9365ebd6 (diff) | |
download | mongo-d75b113186e1914a5f2dc6d1983d604324a8f7f1.tar.gz |
SERVER-28260 Check coauth for killCursors and add killAnyCursors
Diffstat (limited to 'src/mongo/db/cursor_manager.h')
-rw-r--r-- | src/mongo/db/cursor_manager.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/cursor_manager.h b/src/mongo/db/cursor_manager.h index 9683728adab..2736fd181b6 100644 --- a/src/mongo/db/cursor_manager.h +++ b/src/mongo/db/cursor_manager.h @@ -227,6 +227,15 @@ public: */ static std::size_t timeoutCursorsGlobal(OperationContext* opCtx, Date_t now); + /** + * Locate the correct cursor manager for a given cursorId and execute the provided callback. + * Returns ErrorCodes::CursorNotFound if cursorId does not exist. + */ + static Status withCursorManager(OperationContext* opCtx, + CursorId id, + const NamespaceString& nss, + stdx::function<Status(CursorManager*)> callback); + private: static constexpr int kNumPartitions = 16; friend class ClientCursorPin; |