[SERVER-61466] Port the RSM { electionId, setVersion } ordering to scanning RSM Created: 12/Nov/21  Updated: 29/Oct/23  Resolved: 14/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.10
Fix Version/s: 4.4.11

Type: Task Priority: Major - P3
Reporter: Andrew Shuvalov (Inactive) Assignee: Andrew Shuvalov (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam2, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

This is part of porting theĀ SERVER-59409 to v4.4 branch where the build variant "enterprise-ubuntu-scanning-replica-set-monitor-1604-64-bit" is enforcing the functional parity.

In fact the scanning RSM is ignoring the setVersion in the ordering so the code has no feature parity but only the test compatibility parity. I was able to make the test to pass by porting a fail point from streaming RSM to the Refresher::receivedIsMasterFromMaster:

@@ -853,7 +855,16 @@ Status Refresher::receivedIsMasterFromMaster(const HostAndPort& from, const IsMa
                               << _set->maxElectionId};
         }
 
+        const auto existingMaxElectionId = _set->maxElectionId;
         _set->maxElectionId = reply.electionId;
+
+        if (MONGO_unlikely(maxElectionIdSetVersionPairUpdated.shouldFail())) {
+            // name inherited from streaming monitor.
+            LOGV2(6146601,
+                  "Fail point maxElectionIdSetVersionPairUpdated",
+                  "incomingElectionId"_attr = reply.electionId,
+                  "currentMaxElectionId"_attr = existingMaxElectionId);
+        }
     }



 Comments   
Comment by Githook User [ 14/Nov/21 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-61466 SERVER-59409 BACKPORT-10659 Fix race between reconfig replication and stepup
Branch: v4.4
https://github.com/mongodb/mongo/commit/18f93bfb7a2931c474aa8ee9dae990a0d5ec8442

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