diff options
author | Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com> | 2022-01-14 20:03:18 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-14 21:22:02 +0000 |
commit | da1a24bd16ce627122def05de91856ea8686b64a (patch) | |
tree | 9e9af520f1894ec2e92d3fd31a1bf04f0a33c347 /src/mongo/db/s/split_chunk.cpp | |
parent | 5a86a7dfff7743a7ac2dc9484fc854351c253f69 (diff) | |
download | mongo-da1a24bd16ce627122def05de91856ea8686b64a.tar.gz |
SERVER-61726 disallow committing auto-splits for collections under defragmentation
Diffstat (limited to 'src/mongo/db/s/split_chunk.cpp')
-rw-r--r-- | src/mongo/db/s/split_chunk.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/s/split_chunk.cpp b/src/mongo/db/s/split_chunk.cpp index cc66c2672cf..9ea408b54d3 100644 --- a/src/mongo/db/s/split_chunk.cpp +++ b/src/mongo/db/s/split_chunk.cpp @@ -132,7 +132,8 @@ StatusWith<boost::optional<ChunkRange>> splitChunk(OperationContext* opCtx, const ChunkRange& chunkRange, const std::vector<BSONObj>& splitKeys, const std::string& shardName, - const OID& expectedCollectionEpoch) { + const OID& expectedCollectionEpoch, + const bool fromChunkSplitter) { auto scopedSplitOrMergeChunk(uassertStatusOK( ActiveMigrationsRegistry::get(opCtx).registerSplitOrMergeChunk(opCtx, nss, chunkRange))); @@ -153,8 +154,8 @@ StatusWith<boost::optional<ChunkRange>> splitChunk(OperationContext* opCtx, } // Commit the split to the config server. - auto request = - SplitChunkRequest(nss, shardName, expectedCollectionEpoch, chunkRange, splitKeys); + auto request = SplitChunkRequest( + nss, shardName, expectedCollectionEpoch, chunkRange, splitKeys, fromChunkSplitter); auto configCmdObj = request.toConfigCommandBSON(ShardingCatalogClient::kMajorityWriteConcern.toBSON()); |