[SERVER-43210] jstests/sharding/kill_sessions.js doesn't wait for operation to be killed. Created: 06/Sep/19  Updated: 29/Oct/23  Resolved: 24/Sep/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.6.17, 4.3.1, 4.2.3, 4.0.15

Type: Bug Priority: Minor - P4
Reporter: Lamont Nelson Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
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
Steps To Reproduce:

https://jira.mongodb.org/browse/BF-14064?jql=project%20%3D%20%22Build%20Failures%22%20AND%20priority%20!%3D%20%22Trivial%20-%20P5%22%20AND%20assignee%20in%20membersOf(serverteam-sharding)%20AND%20resolution%20is%20EMPTY%20AND%20status%20not%20in%20(%22waiting%20for%20bug%20fix%22%2C%20stuck)%20AND%20project%20%3D%20BF%20AND%20assignee%20%3D%20lamont.nelson%20AND%20status%20%3D%20Open%20ORDER%20BY%20createdDate%20DESC

Sprint: Sharding 2019-10-07
Participants:
Linked BF Score: 11

 Description   

The code that actually does the killing on mongod is here, which ultimately calls ServiceContext->killOperation and OperationContext->interrupt. It looks like this only marks the OpContext to be killed, but doesn't wait for the command to actually finish.

The test is written in a way that assumes that the command is synchronous. Assert.soon in the test will be able to fix this if the command actually should be async.



 Comments   
Comment by Githook User [ 02/Jan/20 ]

Author:

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

Message: SERVER-43210 Allow time for cursors to indicate that a session has been killed in the killSessions helper

(cherry picked from commit c4162d244b9a031b077cc3694f8585288e275ff6)
Branch: v3.6
https://github.com/mongodb/mongo/commit/406017b88b94580f0547a2fd75e10496d6630db3

Comment by Githook User [ 02/Jan/20 ]

Author:

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

Message: SERVER-43210 Allow time for cursors to indicate that a session has been killed in the killSessions helper

(cherry picked from commit c4162d244b9a031b077cc3694f8585288e275ff6)
Branch: v4.0
https://github.com/mongodb/mongo/commit/23fef13afda20fa2da295bee2fbe5dd805bb40a4

Comment by Githook User [ 13/Dec/19 ]

Author:

{'name': 'Lamont Nelson', 'email': 'lamont.nelson@mongodb.com', 'username': 'lamontnelson'}

Message: SERVER-43210 Allow time for cursors to indicate that a session has been killed in the killSessions helper

(cherry picked from commit c4162d244b9a031b077cc3694f8585288e275ff6)
Branch: v4.2
https://github.com/mongodb/mongo/commit/252b462f4bad2d818e81d1aff895c47fa6b3a019

Comment by Githook User [ 23/Sep/19 ]

Author:

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

Message: SERVER-43210 Allow time for cursors to indicate that a session has been killed in the killSessions helper
Branch: master
https://github.com/mongodb/mongo/commit/c4162d244b9a031b077cc3694f8585288e275ff6

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