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

MovePrimarySourceManager::_cleanup() should clear recovery document if in state 'kCommitted', not 'kCloneCompleted'

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • 3.7.9
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2018-05-21

    Description

      The MovePrimarySourceManager currently calls ShardingStateRecovery::endMetadataOp() if in state 'kCloneCompleted'.

      This is probably an accident, since 'kCloneCompleted' state in the MigrationSourceManager and MovePrimarySourceManager represent different logical states:

      MigrationSourceManager:

      enum State {
       kCreated,
       kCloning,
       kCloneCaughtUp,
       kCriticalSection,
       kCloneCompleted,
       kDone
      }; 

      MovePrimarySourceManager:

      enum State {
       kCreated,
       kCloning,
       kCloneCompleted,
       kCriticalSection,
       kCommitted,
       kNeedCleanStaleData,
       kDone
      }; 

      We should rename the MovePrimarySourceManager's states to match the MigrationSourceManager's.

      Attachments

        Activity

          People

            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: