Do not wait for range deletion thread on stepdown

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: 6.2.0-rc0
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide

      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
      
      Show
      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
    • Sharding EMEA 2022-10-31, Sharding EMEA 2022-11-14
    • 55
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Tommaso Tocci
              Reporter:
              Tommaso Tocci
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: