summaryrefslogtreecommitdiff
path: root/src/mongo/s/collection_metadata.h
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2013-07-30 10:50:22 -0400
committerGreg Studer <greg@10gen.com>2013-08-01 10:01:55 -0400
commit57213bdd0d1abf214f4a7db3f6e4aa161a69a9c5 (patch)
tree26cf3db2641b96a32fdeb20cc50d1c40d5e2fc18 /src/mongo/s/collection_metadata.h
parentd18a45b231b8085b59702e6157e4a80b3fc19464 (diff)
downloadmongo-57213bdd0d1abf214f4a7db3f6e4aa161a69a9c5.tar.gz
SERVER-8869 merge chunks: metadata clone and sharding state piece
Diffstat (limited to 'src/mongo/s/collection_metadata.h')
-rw-r--r--src/mongo/s/collection_metadata.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/s/collection_metadata.h b/src/mongo/s/collection_metadata.h
index fe79daa45d5..40494f0de86 100644
--- a/src/mongo/s/collection_metadata.h
+++ b/src/mongo/s/collection_metadata.h
@@ -111,6 +111,19 @@ namespace mongo {
const ChunkVersion& newShardVersion,
string* errMsg ) const;
+ /**
+ * Returns a new metadata instance by merging a key range which starts and ends at existing
+ * chunks into a single chunk. The range may not have holes. The resulting metadata will
+ * have the 'newShardVersion'. 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* cloneMerge( const BSONObj& minKey,
+ const BSONObj& maxKey,
+ const ChunkVersion& newShardVersion,
+ string* errMsg ) const;
+
//
// verification logic
//