diff options
author | Christopher Caplinger <christopher.caplinger@mongodb.com> | 2022-03-21 19:22:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-21 22:24:57 +0000 |
commit | 3c6cae457889f39aee38555022ad62db76d0dd34 (patch) | |
tree | e928d071fbaa3f64d13bbac85501838d0566b2bb /src/mongo/db/repl/tenant_migration_util.cpp | |
parent | 85409b314c52efaa1987d50291f2779dfa314328 (diff) | |
download | mongo-3c6cae457889f39aee38555022ad62db76d0dd34.tar.gz |
SERVER-64059: Fetch committed txn entries lte startApplyingDonorOpTime
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_util.cpp')
-rw-r--r-- | src/mongo/db/repl/tenant_migration_util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/tenant_migration_util.cpp b/src/mongo/db/repl/tenant_migration_util.cpp index fdd4141c426..4386cdf1cce 100644 --- a/src/mongo/db/repl/tenant_migration_util.cpp +++ b/src/mongo/db/repl/tenant_migration_util.cpp @@ -161,18 +161,18 @@ void createOplogViewForTenantMigrations(OperationContext* opCtx, Database* db) { std::unique_ptr<Pipeline, PipelineDeleter> createCommittedTransactionsPipelineForTenantMigrations( const boost::intrusive_ptr<ExpressionContext>& expCtx, - const Timestamp& startFetchingTimestamp, + const Timestamp& startApplyingTimestamp, const std::string& tenantId) { Pipeline::SourceContainer stages; using Doc = Document; - // 1. Match config.transactions entries that have a 'lastWriteOpTime.ts' before - // 'startFetchingTimestamp' and 'state: committed', which indicates that it is a committed + // 1. Match config.transactions entries that have a 'lastWriteOpTime.ts' before or at + // 'startApplyingTimestamp' and 'state: committed', which indicates that it is a committed // transaction. Retryable writes should not have the 'state' field. stages.emplace_back(DocumentSourceMatch::createFromBson( Doc{{"$match", Doc{{"state", Value{"committed"_sd}}, - {"lastWriteOpTime.ts", Doc{{"$lt", startFetchingTimestamp}}}}}} + {"lastWriteOpTime.ts", Doc{{"$lte", startApplyingTimestamp}}}}}} .toBson() .firstElement(), expCtx)); |