diff options
author | Greg Studer <greg@10gen.com> | 2013-07-30 10:50:22 -0400 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-08-01 10:01:55 -0400 |
commit | 57213bdd0d1abf214f4a7db3f6e4aa161a69a9c5 (patch) | |
tree | 26cf3db2641b96a32fdeb20cc50d1c40d5e2fc18 /src/mongo/s/collection_metadata.h | |
parent | d18a45b231b8085b59702e6157e4a80b3fc19464 (diff) | |
download | mongo-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.h | 13 |
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 // |