[SERVER-41004] killSessions command can return CursorNotFound error for successful kill Created: 03/May/19  Updated: 29/Oct/23  Resolved: 19/Jun/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.6.14, 4.0.11, 4.2.0-rc2, 4.3.1

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6
Sprint: Sharding 2019-07-01
Participants:
Linked BF Score: 14

 Description   

When the killSessions command is executed, it will attempt to kill cursors associated with the sessions being killed. As part of this, it will build a list of cursors owned by a session and then kill each cursor in the list. It is possible that in between list fetch and kill that a given cursor is killed by an external operation. When this occurs, a CursorNotFound error will be returned on attempt to kill. While we will continue to kill the remainder of the list, this error will be returned to the user. This is misleading because the end result is the same with all session resources being freed.



 Comments   
Comment by Githook User [ 25/Jun/19 ]

Author:

{'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}

Message: SERVER-41004 Allow CursorNotFound errors to count as a successful kill in the killSessions command

(cherry picked from commit a0c6dc635efc4f14144fa292a626bde63656fbf8)
Branch: v4.2
https://github.com/mongodb/mongo/commit/732734397e624fb5b8682fef4b08f3ad149d7d84

Comment by Githook User [ 25/Jun/19 ]

Author:

{'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}

Message: SERVER-41004 Allow CursorNotFound errors to count as a successful kill in the killSessions command

(cherry picked from commit a0c6dc635efc4f14144fa292a626bde63656fbf8)
Branch: v4.0
https://github.com/mongodb/mongo/commit/25035db4996eec5629014f1212413f7cbc5583b1

Comment by Githook User [ 25/Jun/19 ]

Author:

{'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}

Message: SERVER-41004 Allow CursorNotFound errors to count as a successful kill in the killSessions command

(cherry picked from commit a0c6dc635efc4f14144fa292a626bde63656fbf8)
Branch: v3.6
https://github.com/mongodb/mongo/commit/fdc5a96077aa3a0ddf45b4fea7b1d5c792e0b748

Comment by Githook User [ 19/Jun/19 ]

Author:

{'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}

Message: SERVER-41004 Allow CursorNotFound errors to count as a successful kill in the killSessions command
Branch: master
https://github.com/mongodb/mongo/commit/a0c6dc635efc4f14144fa292a626bde63656fbf8

Generated at Thu Feb 08 04:56:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.