diff options
Diffstat (limited to 'src/mongo/db/s/resharding')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_util.cpp | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/mongo/db/s/resharding/resharding_util.cpp b/src/mongo/db/s/resharding/resharding_util.cpp index 873fc7ce5d5..cef05c8547f 100644 --- a/src/mongo/db/s/resharding/resharding_util.cpp +++ b/src/mongo/db/s/resharding/resharding_util.cpp @@ -276,28 +276,17 @@ std::unique_ptr<Pipeline, PipelineDeleter> createOplogFetchingPipelineForReshard .toBson(), expCtx)); - // TODO (SERVER-62375): Remove upgrade/downgrade code for internal transactions. - if (serverGlobalParams.featureCompatibility.isLessThan( - multiversion::FeatureCompatibilityVersion::kVersion_6_0)) { - // Converts oplog entries with kNeedsRetryImageFieldName into the old style pair of - // update/delete oplog and pre/post image no-op oplog. - stages.emplace_back(DocumentSourceFindAndModifyImageLookup::create(expCtx)); - - // Emits transaction entries chronologically, and adds _id to all events in the stream. - stages.emplace_back(DocumentSourceReshardingIterateTransaction::create(expCtx)); - } else { - // Emits transaction entries chronologically. - stages.emplace_back(DocumentSourceReshardingIterateTransaction::create( - expCtx, true /* includeCommitTransactionTimestamp */)); - - // Converts oplog entries with kNeedsRetryImageFieldName into the old style pair of - // update/delete oplog and pre/post image no-op oplog. - stages.emplace_back(DocumentSourceFindAndModifyImageLookup::create( - expCtx, true /* includeCommitTransactionTimestamp */)); - - // Adds _id to all events in the stream. - stages.emplace_back(DocumentSourceReshardingAddResumeId::create(expCtx)); - } + // Emits transaction entries chronologically. + stages.emplace_back(DocumentSourceReshardingIterateTransaction::create( + expCtx, true /* includeCommitTransactionTimestamp */)); + + // Converts oplog entries with kNeedsRetryImageFieldName into the old style pair of + // update/delete oplog and pre/post image no-op oplog. + stages.emplace_back(DocumentSourceFindAndModifyImageLookup::create( + expCtx, true /* includeCommitTransactionTimestamp */)); + + // Adds _id to all events in the stream. + stages.emplace_back(DocumentSourceReshardingAddResumeId::create(expCtx)); // Filter out applyOps entries which do not contain any relevant operations. stages.emplace_back(DocumentSourceMatch::create( |