summaryrefslogtreecommitdiff
path: root/src/mongo/s/cluster_commands_helpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/cluster_commands_helpers.cpp')
-rw-r--r--src/mongo/s/cluster_commands_helpers.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/s/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp
index 32bc6e50137..abeec91696c 100644
--- a/src/mongo/s/cluster_commands_helpers.cpp
+++ b/src/mongo/s/cluster_commands_helpers.cpp
@@ -626,16 +626,14 @@ RawResponsesResult appendRawResponses(
auto& firstError = genericErrorsReceived.front().second;
if (firstError.code() == ErrorCodes::CollectionUUIDMismatch &&
- firstError.extraInfo<CollectionUUIDMismatchInfo>()->actualNamespace().isEmpty()) {
+ !firstError.extraInfo<CollectionUUIDMismatchInfo>()->actualNamespace()) {
// The first error is a CollectionUUIDMismatchInfo but it doesn't contain an actual
// namespace. It's possible that the acutal namespace is unsharded, in which case only the
// error from the primary shard will contain this information. Iterate through the errors to
// see if this is the case.
for (const auto& error : genericErrorsReceived) {
if (error.second.code() == ErrorCodes::CollectionUUIDMismatch &&
- !error.second.extraInfo<CollectionUUIDMismatchInfo>()
- ->actualNamespace()
- .isEmpty()) {
+ error.second.extraInfo<CollectionUUIDMismatchInfo>()->actualNamespace()) {
firstError = error.second;
break;
}