Cancel range deleter service's waits for ongoing queries in case of stepdown

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Sharding EMEA 2022-10-03, Sharding EMEA 2022-10-17, Sharding EMEA 2022-10-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When a range deletion task is waiting for ongoing queries to finish, such wait is independent from the executor the chain is scheduled on. As a result, invalidating the executor on stepdown does not cause the wait to end.

      In order to don't leave dangling waits around, add a cancellation source member to the range deleter service that is initialized on step-up and invalidated on stepdown, then wait on the future with cancellation.

       

      PS: if the ticket will be done after SERVER-68580, it will not be needed to provide a custom implementation of the cancellation source as it will already be available since the range deleter service is a replica set aware service.

              Assignee:
              Pierlauro Sciarelli
              Reporter:
              Pierlauro Sciarelli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: