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

[v4.4] Ensure waiting for majority write concern after index creation in the destination shard of a migration on empty collections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.13
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2021-12-13, Sharding EMEA 2021-12-27, Sharding EMEA 2022-01-10, Sharding EMEA 2022-01-24
    • 42

      As part of PM-812 range deletions were made resumable after a stepdown, and as part of that project, a waitForWriteConcern was added after writing the range deleter document locally. This code besides it's initial intended purpose (wait for the write of the range deleter document to be majority committed), had the additional consequence to wait for the index creation to be replicated in a majority of nodes, however, this only works if we're working on fcv 4.4. If there was a fcv change to 4.2 the following scenario might occur:

      1. A migration starts with a destination shard that previously didn't have any chunks for the collection
      2. On the destination shard, the index is created on the primary node
      3. The migration finishes with the index being created on the primary node only
      3. There is a stepdown with a rollback, causing the index creation to be rolled back

      We need to ensure the index is created and successfully replicated on destination shard regardless of the FCV version.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: