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

Asynchronously register tasks on the range deleter service on step-up

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding EMEA 2022-08-22, Sharding EMEA 2022-09-05, Sharding EMEA 2022-09-19
    • 170

      Since the range deleter service lifetime is associated with step-up/down (SERVER-67636), non-pending range deletions must be recovered on step-up. The re-registration on the service should happen asynchronously, so that step-up will not be blocked by the initialization of the range deleter.

      A possible way to do so will be the following:

      • Acquire the global scoped range deleter lock
      • Spawn a new thread, passing it the scoped lock:
        • Recover "processing range deletions" (pick up from disk all processing range deletions and register them with the default ongoing queries future)
        • Recover "non-pending" range deletions (pick up from disk all non-pending range deletions and register them with the default ongoing queries future)

      This way, the step-up will not be blocked by the recovery of range deletions and - at the same time - it will not be possible to miss documents because no thread will be allowed to write on the config.rangeDeletions collection as long as the lock will be in scope.

      The recovery performed on the legacy range deleter can partially serve as an example for the work to be done under this ticket. Also, remember to feature flag the legacy recovery as part of this ticket.

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: