diff options
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/cursor_manager.h | 7 | ||||
-rw-r--r-- | src/mongo/s/query/cluster_cursor_manager.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/cursor_manager.h b/src/mongo/db/cursor_manager.h index 13cd5e5184f..19510f0bd03 100644 --- a/src/mongo/db/cursor_manager.h +++ b/src/mongo/db/cursor_manager.h @@ -110,6 +110,13 @@ public: * Returns ErrorCodes::CursorNotFound if the cursor does not exist or * ErrorCodes::QueryPlanKilled if the cursor was killed in between uses. * + * If 'checkSessionAuth' is 'kCheckSession' or left unspecified, this function also checks if + * the current session in the specified 'opCtx' has privilege to access the cursor specified by + * 'id.' In this case, this function returns a 'mongo::Status' with information regarding the + * nature of the inaccessability when the cursor is not accessible. If 'kNoCheckSession' is + * passed for 'checkSessionAuth,' this function does not check if the current session is + * authorized to access the cursor with the given id. + * * Throws a AssertionException if the cursor is already pinned. Callers need not specially * handle this error, as it should only happen if a misbehaving client attempts to * simultaneously issue two operations against the same cursor id. diff --git a/src/mongo/s/query/cluster_cursor_manager.h b/src/mongo/s/query/cluster_cursor_manager.h index 3d0afe5db94..0fcf0a51532 100644 --- a/src/mongo/s/query/cluster_cursor_manager.h +++ b/src/mongo/s/query/cluster_cursor_manager.h @@ -381,6 +381,13 @@ public: * cursor. This function should check whether the current client is also authorized to use this * cursor, and if not, return an error status, which will cause checkOutCursor to fail. * + * If 'checkSessionAuth' is 'kCheckSession' or left unspecified, this function also checks if + * the current session in the specified 'opCtx' has privilege to access the cursor specified by + * 'id.' In this case, this function returns a 'mongo::Status' with information regarding the + * nature of the inaccessability when the cursor is not accessible. If 'kNoCheckSession' is + * passed for 'checkSessionAuth,' this function does not check if the current session is + * authorized to access the cursor with the given id. + * * This method updates the 'last active' time associated with the cursor to the current time. * * Does not block. |