summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding/resharding_recipient_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_recipient_service.cpp')
-rw-r--r--src/mongo/db/s/resharding/resharding_recipient_service.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mongo/db/s/resharding/resharding_recipient_service.cpp b/src/mongo/db/s/resharding/resharding_recipient_service.cpp
index 6fa3ca44f4d..07980cd9740 100644
--- a/src/mongo/db/s/resharding/resharding_recipient_service.cpp
+++ b/src/mongo/db/s/resharding/resharding_recipient_service.cpp
@@ -279,15 +279,7 @@ void ReshardingRecipientService::RecipientStateMachine::_transitionState(
return;
}
- if (fetchTimestamp) {
- auto& fetchTimestampStruct = replacementDoc.getFetchTimestampStruct();
-
- // If the recipient is recovering and already knows the fetchTimestamp, it cannot change
- if (fetchTimestampStruct.getFetchTimestamp())
- invariant(fetchTimestampStruct.getFetchTimestamp().get() == fetchTimestamp.get());
-
- fetchTimestampStruct.setFetchTimestamp(std::move(fetchTimestamp));
- }
+ emplaceFetchTimestampIfExists(replacementDoc, std::move(fetchTimestamp));
_updateRecipientDocument(std::move(replacementDoc));
}