diff options
Diffstat (limited to 'src/mongo/db/s/collection_metadata.cpp')
-rw-r--r-- | src/mongo/db/s/collection_metadata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/s/collection_metadata.cpp b/src/mongo/db/s/collection_metadata.cpp index f9e1a32ac51..9813a45275b 100644 --- a/src/mongo/db/s/collection_metadata.cpp +++ b/src/mongo/db/s/collection_metadata.cpp @@ -170,7 +170,7 @@ Status CollectionMetadata::checkChunkIsValid(const ChunkType& chunk) { ChunkType existingChunk; if (!getNextChunk(chunk.getMin(), &existingChunk)) { - return {ErrorCodes::IncompatibleShardingMetadata, + return {ErrorCodes::StaleShardVersion, str::stream() << "Chunk with bounds " << ChunkRange(chunk.getMin(), chunk.getMax()).toString() << " is not owned by this shard."}; @@ -178,7 +178,7 @@ Status CollectionMetadata::checkChunkIsValid(const ChunkType& chunk) { if (existingChunk.getMin().woCompare(chunk.getMin()) || existingChunk.getMax().woCompare(chunk.getMax())) { - return {ErrorCodes::IncompatibleShardingMetadata, + return {ErrorCodes::StaleShardVersion, str::stream() << "Unable to find chunk with the exact bounds " << ChunkRange(chunk.getMin(), chunk.getMax()).toString() << " at collection version " |