From a8c4b5bbf7b838a639b7133cfcad5a92a65041cc Mon Sep 17 00:00:00 2001 From: Luis Osta Date: Thu, 7 Oct 2021 20:22:34 +0000 Subject: SERVER-60220 Swap order of logChange and in-memory state update --- src/mongo/db/s/resharding/resharding_coordinator_service.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp index a2fa8fc94c9..e87e5d2a705 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp @@ -992,11 +992,6 @@ void ReshardingCoordinatorService::ReshardingCoordinator::installCoordinatorDoc( bob.append("namespace", doc.getSourceNss().toString()); bob.append("collectionUUID", doc.getSourceUUID().toString()); bob.append("reshardingUUID", doc.getReshardingUUID().toString()); - ShardingLogging::get(opCtx)->logChange(opCtx, - "resharding.coordinator.transition", - doc.getSourceNss().toString(), - bob.obj(), - ShardingCatalogClient::kMajorityWriteConcern); LOGV2_INFO(5343001, "Transitioned resharding coordinator state", @@ -1007,6 +1002,11 @@ void ReshardingCoordinatorService::ReshardingCoordinator::installCoordinatorDoc( "reshardingUUID"_attr = doc.getReshardingUUID()); _coordinatorDoc = doc; + ShardingLogging::get(opCtx)->logChange(opCtx, + "resharding.coordinator.transition", + doc.getSourceNss().toString(), + bob.obj(), + ShardingCatalogClient::kMajorityWriteConcern); } void markCompleted(const Status& status) { -- cgit v1.2.1