summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/move_primary_source_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/move_primary_source_manager.h')
-rw-r--r--src/mongo/db/s/move_primary_source_manager.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/mongo/db/s/move_primary_source_manager.h b/src/mongo/db/s/move_primary_source_manager.h
index 42586f9d102..cd678c95b19 100644
--- a/src/mongo/db/s/move_primary_source_manager.h
+++ b/src/mongo/db/s/move_primary_source_manager.h
@@ -70,10 +70,10 @@ public:
* Instantiates a new movePrimary source manager. Must be called with the distributed lock
* acquired in advance (not asserted).
*
- * May throw any exception. Known exceptions are:
+ * May throw any exception. Known exceptions (TODO) are:
* - InvalidOptions if the operation context is missing database version
- * - StaleConfig if the expected database version does not match what we find it to be after
- * acquiring the distributed lock
+ * - StaleConfigException if the expected database version does not match what we find it
+ * to be after acquiring the distributed lock.
*/
MovePrimarySourceManager(OperationContext* opCtx,
@@ -145,20 +145,10 @@ private:
}
/**
- * Invokes the _configsvrCommitMovePrimary command of the config server to reassign the primary
- * shard of the database.
+ * Updates CSRS metadata in config.databases collection to move the given primary database on
+ * its new shard.
*/
- Status _commitOnConfig(OperationContext* opCtx, const DatabaseVersion& expectedDbVersion);
-
- /**
- * Updates the config server's metadata in config.databases collection to reassign the primary
- * shard of the database.
- *
- * This logic is not synchronized with the removeShard command and simultaneous invocations of
- * movePrimary and removeShard can lead to data loss.
- */
- Status _fallbackCommitOnConfig(OperationContext* opCtx,
- const DatabaseVersion& expectedDbVersion);
+ Status _commitOnConfig(OperationContext* opCtx);
// Used to track the current state of the source manager. See the methods above, which have
// comments explaining the various state transitions.