summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/collection_metadata.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-22 14:21:30 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-23 09:10:57 -0400
commitd9a1dd9dbd4349b18151a3223a718cf1642cd5b6 (patch)
tree938a3a971582ee8eca9b5969be1a2b0e1ee12a10 /src/mongo/db/s/collection_metadata.h
parent4deaa5883717145719caaca5002aa3ce4bf1fc76 (diff)
downloadmongo-d9a1dd9dbd4349b18151a3223a718cf1642cd5b6.tar.gz
SERVER-23296 Move pending chunk management under MigrationDestinationManager
Moves the code, which manipulates the pending chunk data to reside under the migration destination manager instead of the global sharding state and makes it use the collection sharding state instead of the global map.
Diffstat (limited to 'src/mongo/db/s/collection_metadata.h')
-rw-r--r--src/mongo/db/s/collection_metadata.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mongo/db/s/collection_metadata.h b/src/mongo/db/s/collection_metadata.h
index 6d9a1063b0c..d11b0ca2fff 100644
--- a/src/mongo/db/s/collection_metadata.h
+++ b/src/mongo/db/s/collection_metadata.h
@@ -71,22 +71,16 @@ public:
*
* The shard and collection version of the new metadata are unaffected. The caller owns the
* new metadata.
- *
- * If a new metadata can't be created, returns NULL and fills in 'errMsg', if it was
- * provided.
*/
- CollectionMetadata* cloneMinusPending(const ChunkType& pending, std::string* errMsg) const;
+ std::unique_ptr<CollectionMetadata> cloneMinusPending(const ChunkType& chunk) const;
/**
* Returns a new metadata's instance based on 'this's state by adding a 'pending' chunk.
*
* The shard and collection version of the new metadata are unaffected. The caller owns the
* new metadata.
- *
- * If a new metadata can't be created, returns NULL and fills in 'errMsg', if it was
- * provided.
*/
- CollectionMetadata* clonePlusPending(const ChunkType& pending, std::string* errMsg) const;
+ std::unique_ptr<CollectionMetadata> clonePlusPending(const ChunkType& chunk) const;
/**
* Returns a new metadata's instance based on 'this's state by removing 'chunk'. When cloning