[SERVER-46767] Provide a mapping from OperationKey to CursorID Created: 10/Mar/20  Updated: 08/Jan/24  Resolved: 24/Mar/20

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: Nicholas Zolnierz
Resolution: Fixed Votes: 0
Labels: qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-46255 establishCursors/AsyncRequestsSender ... Closed
is depended on by SERVER-46648 Cancel pending requests upon receivin... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Query 2020-03-23, Query 2020-04-06
Participants:

 Description   

We introduced OperationKeys as part of SERVER-44167, which allows a user to provide a GUID in any command which it can later be killed by via the killOperations command.

We'd like to extend that functionality to also kill cursors created by that OperationKey, and would like to see if we can tag those UUIDs onto cursors and provide an accessor which gives a list of cursor ids for a given list operation keys (because we bulk kill operations).

Ideally I'd want something like:

std::vector<CursorId> getCursorIdsForOperationKeys(std::vector<OperationKey>)

as a method on the cursor manager. That way I could write an external service to lookup those ids and kill them through the public api.

Optionally, I'd also be happy to consider a killCursor method which took a vector of OperationKeys



 Comments   
Comment by Githook User [ 30/Mar/20 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-46767 Provide a mapping from OperationKey to CursorID in the CursorManager

(cherry picked from commit e21e03697dae0dbb6cd63ddada41ca4801d6bb79)
Branch: v4.4
https://github.com/mongodb/mongo/commit/43f1c060c23f4cd9a11e4a3dffc52a80e36180a2

Comment by Githook User [ 24/Mar/20 ]

Author:

{'email': 'nicholas.zolnierz@mongodb.com', 'name': 'Nick Zolnierz', 'username': 'nzolnierzmdb'}

Message: SERVER-46767 Provide a mapping from OperationKey to CursorID in the CursorManager
Branch: master
https://github.com/mongodb/mongo/commit/e21e03697dae0dbb6cd63ddada41ca4801d6bb79

Comment by Nicholas Zolnierz [ 11/Mar/20 ]

mira.carey@mongodb.com just to clarify, this ticket will not involve modifying the existing killOperations command, but rather expose some functionality in the cursor manager to eventually allow us to kill a cursor via operation key. Is that correct? If so, is there a follow-up ticket to extend killOperations that I can watch?

Generated at Thu Feb 08 05:12:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.