Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68776

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

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 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

      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@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: