diff options
author | Arun Banala <arun.banala@mongodb.com> | 2021-04-27 12:52:24 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-27 14:43:01 +0000 |
commit | 3774a333d32ec053145bc9677a0cae3f7bd4522c (patch) | |
tree | 1a7bd61f6d169f0f52f3e9d8fb6bb00e11de1295 | |
parent | 7f669695d08ad2655daa085b1e9004b9158db8a9 (diff) | |
download | mongo-3774a333d32ec053145bc9677a0cae3f7bd4522c.tar.gz |
SERVER-55672 Fix bug in oplog ts logic when 'stopApplyingFilterAfterFirstMatch' is set
4 files changed, 7 insertions, 7 deletions
diff --git a/jstests/sharding/change_streams.js b/jstests/sharding/change_streams.js index faec2047d4c..9ea3357aecb 100644 --- a/jstests/sharding/change_streams.js +++ b/jstests/sharding/change_streams.js @@ -1,7 +1,6 @@ // Tests the behavior of change streams on sharded collections. // @tags: [ // requires_majority_read_concern, -// sbe_incompatible, // uses_change_streams, // ] (function() { diff --git a/jstests/sharding/resharding_oplog_sync_agg_assert_min_oplog.js b/jstests/sharding/resharding_oplog_sync_agg_assert_min_oplog.js index 08b0d6c8f7a..cd866ab8530 100644 --- a/jstests/sharding/resharding_oplog_sync_agg_assert_min_oplog.js +++ b/jstests/sharding/resharding_oplog_sync_agg_assert_min_oplog.js @@ -3,7 +3,6 @@ * entries from a donor shard. * @tags: [ * requires_fcv_47, - * sbe_incompatible, * ] */ (function() { @@ -77,4 +76,4 @@ assert.commandFailedWithCode(localDb.runCommand({ jsTest.log("End of test"); rst.stopSet(); -})();
\ No newline at end of file +})(); diff --git a/jstests/sharding/resharding_oplog_sync_agg_resume_token.js b/jstests/sharding/resharding_oplog_sync_agg_resume_token.js index e3b3de2cff6..3598fb0b1ab 100644 --- a/jstests/sharding/resharding_oplog_sync_agg_resume_token.js +++ b/jstests/sharding/resharding_oplog_sync_agg_resume_token.js @@ -4,7 +4,6 @@ * * @tags: [ * requires_fcv_47, - * sbe_incompatible, * ] */ (function() { diff --git a/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp b/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp index 890d443dae7..89e80a12769 100644 --- a/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp +++ b/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp @@ -375,6 +375,9 @@ std::pair<std::unique_ptr<sbe::PlanStage>, PlanStageSlots> generateOptimizedOplo resultSlot = slotIdGenerator->generate(); recordIdSlot = slotIdGenerator->generate(); + std::tie(fields, slots, tsSlot) = makeOplogTimestampSlotsIfNeeded( + env, slotIdGenerator, shouldTrackLatestOplogTimestamp); + stage = sbe::makeS<sbe::LoopJoinStage>( sbe::makeS<sbe::LimitSkipStage>(std::move(stage), 1, boost::none, csn->nodeId()), sbe::makeS<sbe::ScanStage>(collection->uuid(), @@ -383,9 +386,9 @@ std::pair<std::unique_ptr<sbe::PlanStage>, PlanStageSlots> generateOptimizedOplo boost::none, boost::none, boost::none, - boost::none, - std::vector<std::string>(), - sbe::makeSV(), + tsSlot, + std::move(fields), + std::move(slots), seekRecordIdSlot, true /* forward */, yieldPolicy, |