summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/move_primary_coordinator.h
diff options
context:
space:
mode:
authorAntonio Fuschetto <antonio.fuschetto@mongodb.com>2023-03-27 09:38:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-27 10:21:23 +0000
commit1121008575fad33d21e5589343ce58242d89cc80 (patch)
treefcedb35d7577165e8c034d4a7ef066df42b1a92e /src/mongo/db/s/move_primary_coordinator.h
parent177dd5b6eebed3bda58fde5ea7528d654037a070 (diff)
downloadmongo-1121008575fad33d21e5589343ce58242d89cc80.tar.gz
SERVER-74695 Improve the readability of the movePrimary's cloning phase
Diffstat (limited to 'src/mongo/db/s/move_primary_coordinator.h')
-rw-r--r--src/mongo/db/s/move_primary_coordinator.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/db/s/move_primary_coordinator.h b/src/mongo/db/s/move_primary_coordinator.h
index 58619966d94..5136f73a0ee 100644
--- a/src/mongo/db/s/move_primary_coordinator.h
+++ b/src/mongo/db/s/move_primary_coordinator.h
@@ -85,16 +85,15 @@ private:
/**
* Requests to the recipient to clone all the collections of the given database currently owned
* by this shard. Once the cloning is complete, the recipient returns the list of the actually
- * cloned collections as part of the response.
+ * cloned collections.
*/
- StatusWith<Shard::CommandResponse> cloneDataToRecipient(OperationContext* opCtx) const;
+ std::vector<NamespaceString> cloneDataToRecipient(OperationContext* opCtx) const;
/**
- * Returns `true` whether the list of actually cloned collections (returned by the cloning
- * command response) matches the list of collection to clone (persisted in the coordinator
- * document), `false` otherwise.
+ * Ensures that the list of actually cloned collections (returned by the cloning command)
+ * matches the list of collections to clone (persisted in the coordinator document).
*/
- bool checkClonedData(Shard::CommandResponse cloneResponse) const;
+ void assertClonedData(const std::vector<NamespaceString>& clonedCollections) const;
/**
* Commits the new primary shard for the given database to the config server. The database