summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaley Connelly <haley.connelly@mongodb.com>2021-06-14 20:51:18 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-16 17:21:01 +0000
commitec2596290a3a598b6f6ae1ec2097632f32fad563 (patch)
tree1251f23f8c85e6c460a214385e31e05f7b42611b
parentfc1ea44740c05ab73ce0bcf8a1897aa322b1d057 (diff)
downloadmongo-ec2596290a3a598b6f6ae1ec2097632f32fad563.tar.gz
SERVER-55434 Log when Resharding Donor/Recipient coordinator updates are unsuccessful
-rw-r--r--src/mongo/db/s/resharding/resharding_donor_service.cpp12
-rw-r--r--src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp12
2 files changed, 22 insertions, 2 deletions
diff --git a/src/mongo/db/s/resharding/resharding_donor_service.cpp b/src/mongo/db/s/resharding/resharding_donor_service.cpp
index 52c39655925..99b6a0af97d 100644
--- a/src/mongo/db/s/resharding/resharding_donor_service.cpp
+++ b/src/mongo/db/s/resharding/resharding_donor_service.cpp
@@ -151,13 +151,23 @@ public:
const BSONObj& query,
const BSONObj& update) override {
auto catalogClient = Grid::get(opCtx)->catalogClient();
- uassertStatusOK(catalogClient->updateConfigDocument(
+ auto docWasModified = uassertStatusOK(catalogClient->updateConfigDocument(
opCtx,
NamespaceString::kConfigReshardingOperationsNamespace,
query,
update,
false, /* upsert */
ShardingCatalogClient::kMajorityWriteConcern));
+
+ if (!docWasModified) {
+ LOGV2_DEBUG(
+ 5543400,
+ 1,
+ "Resharding coordinator document was not modified by the donor's update; this is "
+ "expected when the update had previously been interrupted due to a stepdown",
+ "query"_attr = query,
+ "update"_attr = update);
+ }
}
};
diff --git a/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp b/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp
index f160955a050..39d748a250e 100644
--- a/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp
+++ b/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp
@@ -153,13 +153,23 @@ void RecipientStateMachineExternalStateImpl::updateCoordinatorDocument(Operation
const BSONObj& query,
const BSONObj& update) {
auto catalogClient = Grid::get(opCtx)->catalogClient();
- uassertStatusOK(
+ auto docWasModified = uassertStatusOK(
catalogClient->updateConfigDocument(opCtx,
NamespaceString::kConfigReshardingOperationsNamespace,
query,
update,
false, /* upsert */
ShardingCatalogClient::kMajorityWriteConcern));
+
+ if (!docWasModified) {
+ LOGV2_DEBUG(
+ 5543401,
+ 1,
+ "Resharding coordinator document was not modified by the recipient's update; this is "
+ "expected when the update had previously been interrupted due to a stepdown",
+ "query"_attr = query,
+ "update"_attr = update);
+ }
}
} // namespace mongo