diff options
author | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2022-01-18 15:11:37 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-18 15:35:59 +0000 |
commit | f857a8efec9cde7a8c6ee903043e2cd4b5396d48 (patch) | |
tree | bd4c0eb5f5e33973e8edc8d7e2a5fb5b7cda6864 /src/mongo/db/repl | |
parent | fd275f66b712e0af181b53575efbe8a87f214a5e (diff) | |
download | mongo-f857a8efec9cde7a8c6ee903043e2cd4b5396d48.tar.gz |
SERVER-58410: Remove no stable recovery timestamp invariant after initial sync
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/replication_consistency_markers_impl.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.cpp b/src/mongo/db/repl/replication_consistency_markers_impl.cpp index b6ebe6eb9c1..dde621e310d 100644 --- a/src/mongo/db/repl/replication_consistency_markers_impl.cpp +++ b/src/mongo/db/repl/replication_consistency_markers_impl.cpp @@ -155,11 +155,7 @@ void ReplicationConsistencyMarkersImpl::clearInitialSyncFlag(OperationContext* o // first stable checkpoint taken after initial sync (when the stable timestamp is >= the // initialDataTimestamp). If we crash before the first stable checkpoint is taken, we are // guaranteed to come back up with the initial sync flag. In this corner case, this node has to - // be resynced. Invariant that we haven't taken a stable checkpoint. - auto stableTimestamp = - _storageInterface->getLastStableRecoveryTimestamp(opCtx->getServiceContext()); - invariant(!stableTimestamp || stableTimestamp->isNull()); - + // be resynced. auto replCoord = repl::ReplicationCoordinator::get(opCtx); OpTimeAndWallTime opTimeAndWallTime = replCoord->getMyLastAppliedOpTimeAndWallTime(); BSONObj update = BSON("$unset" << kInitialSyncFlag); |