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

Prevent cleanupOrphan from deleting migrating chunk data before commit

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.2.8
    • None
    • Sharding
    • Fully Compatible
    • ALL
    • v3.0
    • Sharding 15 (06/03/16), Sharding 16 (06/24/16)

    Description

      cleanupOrphaned can be called between
      MigrationSourceManager::enterCriticalSection and
      MigrationSourceManager::commitDonateChunk. The _uncommittedMetadata variable is create and saved in MigrationSourceManager::enterCriticalSection, but the actual commit doesn't happen until MigrationSourceManager::commitDonateChunk is finished. cleanupOrphaned can sneak in between and use the _uncommittedMetadata saved state to decide the not yet committed chunk – which can still fail to be committed, thus we end up keeping the chunk data – is gone and then delete all the data.

      The master fix is going in as a result of SERVER-22659 – the commit to remove the _uncommittedMetadata variable. It needs to be backported, and modified if necessary.

      Attachments

        Activity

          People

            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: