summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/active_migrations_registry.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/active_migrations_registry.h')
-rw-r--r--src/mongo/db/s/active_migrations_registry.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/s/active_migrations_registry.h b/src/mongo/db/s/active_migrations_registry.h
index c17180f5fb2..4d75a6845b0 100644
--- a/src/mongo/db/s/active_migrations_registry.h
+++ b/src/mongo/db/s/active_migrations_registry.h
@@ -96,12 +96,15 @@ public:
* ScopedReceiveChunk will unregister the migration when the ScopedReceiveChunk goes out of
* scope.
*
- * Otherwise returns a ConflictingOperationInProgress error.
+ * Otherwise returns a ConflictingOperationInProgress error if waitForOngoingMigrations is false
+ * or waits for the ongoing migration/split/merge to finish and then registers the migration if
+ * waitForOngoingMigrations is true.
*/
StatusWith<ScopedReceiveChunk> registerReceiveChunk(OperationContext* opCtx,
const NamespaceString& nss,
const ChunkRange& chunkRange,
- const ShardId& fromShardId);
+ const ShardId& fromShardId,
+ bool waitForOngoingMigrations);
/**
* If there are no migrations running on this shard, registers an active split or merge