[SERVER-59329] Make sure that withTemporaryOperationContext throw an error if the node is no longer a primary Created: 12/Aug/21  Updated: 29/Oct/23  Resolved: 21/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.11, 5.1.0-rc0, 5.0.5

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Kshitij Gupta
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-60161 Deadlock between config server stepdo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Participants:
Linked BF Score: 142

 Description   

withTemporaryOperationContext is used to submit range deletion tasks, but it can run after the node is no longer a primary and when that occurs the opCtx that it creates will not get interrupted by stepdown. Therefore, we should check after creating the opCtx that the node is still a primary before calling callable.



 Comments   
Comment by Githook User [ 09/Nov/21 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-59329: Make sure that withTemporaryOperationContext throw an error if the node is no longer a primary

(cherry picked from commit 6f7a69e)
Branch: v4.4
https://github.com/mongodb/mongo/commit/283e0878932c303e9bec68c14e6d3038c05830e8

Comment by Githook User [ 08/Nov/21 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-59329: Make sure that withTemporaryOperationContext throw an e...
Branch: v5.0
https://github.com/mongodb/mongo/commit/ce921f75b2ea9f520726c321cf87a3e83514bb81

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-59329: Make sure that withTemporaryOperationContext throw an error if the node is no longer a primary
Branch: master
https://github.com/mongodb/mongo/commit/6f7a69e8d5aef3d924a639c4f8625bc259334ffb

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