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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.4.13
    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: