[SERVER-70964] Do not wait for range deletion thread on stepdown Created: 30/Oct/22  Updated: 29/Oct/23  Resolved: 03/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.2.0-rc0
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File SERVER-70964-reproducible.patch    
Issue Links:
Duplicate
is duplicated by SERVER-70949 Condition variable wait might lead to... Closed
Problem/Incident
causes SERVER-71275 Move up initialization of range delet... Closed
causes SERVER-73293 Make sure range deleter service is up... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Apply the provided patch on top of r6.2.0-alpha-1295-gab34541c92e and run:

resmoke.py --suite=sharding jstests/sharding/range_deletion_hang_stepdown.js

Sprint: Sharding EMEA 2022-10-31, Sharding EMEA 2022-11-14
Participants:
Linked BF Score: 55

 Description   

On stepdown the RangeDeleterService destruct the ReadyRangeDeletionsProcessor that in turns interrupt and join its internal thread.

In order not to slowdown the stepdown process we should instead

  • Interrupt the internal thread onStepDown()
  • Join the internal thread onStepUpBegin()
  • Start the internal thread onStepUpComplete

The proposed approach will still guarantee that all the previous range deletions will be drained strictly before the node can transition to PRIMARY again.



 Comments   
Comment by Githook User [ 03/Nov/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-70964 Do not wait for range deletion thread on stepdown
Branch: master
https://github.com/mongodb/mongo/commit/de6eb37f324ca66b48bf0136994a932a62a2a2a1

Generated at Thu Feb 08 06:17:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.