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

Refreshes to recover migrations must never join ongoing refreshes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.2.0, 5.0.5, 5.1.1
    • 5.0.8, 5.3.0
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-12-27, Sharding EMEA 2022-01-10
    • 134

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: