diff options
Diffstat (limited to 'src/mongo/db/s/sharding_state.h')
-rw-r--r-- | src/mongo/db/s/sharding_state.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h index 8e8f0c20074..9cf94cd4526 100644 --- a/src/mongo/db/s/sharding_state.h +++ b/src/mongo/db/s/sharding_state.h @@ -214,6 +214,15 @@ public: StatusWith<ScopedRegisterDonateChunk> registerDonateChunk(const MoveChunkRequest& args); /** + * If there are no migrations running on this shard, registers an active receive operation with + * the specified session id and returns a ScopedRegisterReceiveChunk, which will unregister it + * when it goes out of scope. + * + * Otherwise returns a ConflictingOperationInProgress error. + */ + StatusWith<ScopedRegisterReceiveChunk> registerReceiveChunk(const NamespaceString& nss); + + /** * If a migration has been previously registered through a call to registerDonateChunk returns * that namespace. Otherwise returns boost::none. * |