[SERVER-53855] Resharding recipient secondaries ignore no-op oplog entries meant to bump config.transactions records Created: 17/Jan/21  Updated: 29/Oct/23  Resolved: 21/Jan/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: PM-234-M2.5, PM-234-T-oplog-apply
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-53854 checkReplicatedDataHashes() may retur... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-01-25
Participants:
Story Points: 1

 Description   

SessionUpdateTracker::_updateSessionInfo() expects that {fromMigrate: true} has been set on the no-op oplog entry for it to be added as a derived operation to the oplog batch applied by secondaries.

// Ignore any no-op oplog entries, except for the ones generated from session migration
// of CRUD ops. These entries will have an o2 field that contains the original CRUD
// oplog entry.
if (entry.getOpType() == OpTypeEnum::kNoop) {
    if (!entry.getFromMigrate() || !*entry.getFromMigrate()) {
        return;
    }
 
    if (!entry.getObject2()) {
        return;
    }
}



 Comments   
Comment by Githook User [ 21/Jan/21 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-53855 Resharding recipient secondaries ignore no-op oplog entries meant to bump config.transactions records
Branch: master
https://github.com/mongodb/mongo/commit/f074bb15df6c01bdcf03b866bb341a9e218f4609

Comment by Max Hirschhorn [ 18/Jan/21 ]

Looking back over the C++ code, in addition to {fromMigrate: true} not being set on the generated $reshardingOplogApply oplog entry, we similarly aren't setting an 'o2' field when the oplog entry is from a multi-document transaction.

Generated at Thu Feb 08 05:32:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.