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

Shard can migrate on top of orphans after filtering metadata was cleared

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.4.8, 5.0.2
    • 4.4.10, 5.0.4, 5.1.0-rc0
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • v5.0, v4.4
    • 74

    Description

      A migration recipient may start cloning data that overlaps with an ongoing range deletion if the filtering metadata was cleared before starting receiving the migration.

      1. Consider we have an ongoing range deletion (e.g we donated a chunk).
      2. For whatever reason (e.g. a failed metadata refresh), the filtering metadata gets cleared.
      3. Now we start receiving a chunk that overlaps that range deletion (i.e. the same chunk we recently donated away)
      4. MigrationDestinationManager will see that there is an existing overlapping range deletion document, so it will attempt to wait for the rangeDeletion task to finish through the CSR. However, because the metadata was cleared on step (2), the current metadata is not aware of that range deletion. So 'waitForClean' will return OK right away.
      5. So MigrationDestinationManager will begin cloning documents, even though the range deletion is ongoing and may delete them. Thus causing data loss.

      This regression was introduced on SERVER-52906 because this 'while' was changed to an 'if'

      Attachments

        Issue Links

          Activity

            People

              jordi.serra-torrens@mongodb.com Jordi Serra Torrens
              jordi.serra-torrens@mongodb.com Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: