diff options
author | Matthew Saltz <matthew.saltz@mongodb.com> | 2018-05-17 16:54:21 -0400 |
---|---|---|
committer | Matthew Saltz <matthew.saltz@mongodb.com> | 2018-05-18 11:18:59 -0400 |
commit | 35e9928bf33c6270e3195a00c24fe7a09edf512e (patch) | |
tree | 95079edc09345afcc1d4373ef0599d8709bd7dfa /src/mongo/db/s/move_primary_source_manager.cpp | |
parent | 9ca43580864a05c6eb543b5bee8402d82bd99bc7 (diff) | |
download | mongo-35e9928bf33c6270e3195a00c24fe7a09edf512e.tar.gz |
SERVER-34807 Rename states in movePrimary state machine to match migration
Diffstat (limited to 'src/mongo/db/s/move_primary_source_manager.cpp')
-rw-r--r-- | src/mongo/db/s/move_primary_source_manager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/s/move_primary_source_manager.cpp b/src/mongo/db/s/move_primary_source_manager.cpp index 2bfd92cedfb..5b8902455de 100644 --- a/src/mongo/db/s/move_primary_source_manager.cpp +++ b/src/mongo/db/s/move_primary_source_manager.cpp @@ -121,14 +121,14 @@ Status MovePrimarySourceManager::clone(OperationContext* opCtx) { } } - _state = kCloneCompleted; + _state = kCloneCaughtUp; scopedGuard.Dismiss(); return Status::OK(); } Status MovePrimarySourceManager::enterCriticalSection(OperationContext* opCtx) { invariant(!opCtx->lockState()->isLocked()); - invariant(_state == kCloneCompleted); + invariant(_state == kCloneCaughtUp); auto scopedGuard = MakeGuard([&] { cleanupOnError(opCtx); }); // Mark the shard as running a critical operation that requires recovery on crash. @@ -281,7 +281,7 @@ Status MovePrimarySourceManager::commitOnConfig(OperationContext* opCtx) { return commitStatus; } - _state = kCommitted; + _state = kCloneCompleted; _cleanup(opCtx); @@ -368,9 +368,9 @@ void MovePrimarySourceManager::_cleanup(OperationContext* opCtx) { ShardingStateRecovery::endMetadataOp(opCtx); } - // If we're in the kCommitted state, then we need to do the last step of cleaning up + // If we're in the kCloneCompleted state, then we need to do the last step of cleaning up // now-stale data on the old primary. Otherwise, indicate that we're done. - if (_state != kCommitted) { + if (_state != kCloneCompleted) { _state = kDone; } |