summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2022-04-05 14:16:10 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-05 15:24:50 +0000
commit4f849e41dc7f4369cdc7e5892a60a4817800360d (patch)
treeacf3c455d8d10c6b289723df764d5a88ba31ae8a /src
parenta9687768331c2884fb127721fae2e4b212b6f17f (diff)
downloadmongo-4f849e41dc7f4369cdc7e5892a60a4817800360d.tar.gz
SERVER-64552 Replace invariant with assertion for non-joinable rename collection participants
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp
index aa2b2bf013c..23a96214a64 100644
--- a/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp
+++ b/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp
@@ -89,11 +89,12 @@ public:
const auto renameCollectionParticipant =
RenameParticipantInstance::getOrCreate(opCtx, service, participantDocBSON);
bool hasSameOptions = renameCollectionParticipant->hasSameOptions(participantDocBSON);
- invariant(hasSameOptions,
- str::stream() << "Another rename participant for namespace " << fromNss
- << "is instantiated with different parameters: `"
- << renameCollectionParticipant->doc() << "` vs `"
- << participantDocBSON << "`");
+ uassert(ErrorCodes::InvalidOptions,
+ str::stream() << "Another rename participant for namespace " << fromNss
+ << "is instantiated with different parameters: `"
+ << renameCollectionParticipant->doc() << "` vs `"
+ << participantDocBSON << "`",
+ hasSameOptions);
renameCollectionParticipant->getBlockCRUDAndRenameCompletionFuture().get(opCtx);