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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0.0-rc0
    • Affects Version/s: 3.7.9
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2018-05-21
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Matthew Saltz (Inactive)
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: