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

Refreshes to recover migrations must never join ongoing refreshes

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.8, 5.3.0
    • Affects Version/s: 5.2.0, 5.0.5, 5.1.1
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-12-27, Sharding EMEA 2022-01-10
    • 134

      On step-up - more specifically during drain mode - a thread calling into onShardVersionMismatch is spawned in order to recover potential outstanding migrations.

      The implementation of onShardVersionMismatch is assuming that - during drain mode - no other refresh could be running because user requests don't get served. However, this turns out to be incorrect because previously spawned refreshes are not killed on step-down/up as they are happening on a different thread than the command that spawned them.

      It is then possible that the recovery on a primary node joins a refresh that started when the node was secondary, skipping the recovery.

            Assignee:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: