[SERVER-66423] Set the fromMigrate flag of DurableReplOperation entries only when FCV is 6.0 or greater Created: 11/May/22  Updated: 29/Oct/23  Resolved: 16/May/22

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 6.0.0-rc6

Type: Task Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-65858 Mark the applyOps entries when the op... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0
Sprint: Sharding EMEA 2022-05-16, Sharding EMEA 2022-05-30
Participants:

 Description   

The fromMigrate flag has been added to the DurableReplOperation class (IDL-defined) in 6.1 and this will be backported to 6.0 also (see SERVER-65858).

The procedure for downgrading the replica sets requires 1) downgrading the FVC and 2) downgrading each binary starting from secondary nodes. This implies that it exists a time window in which the primary node uses a new binary where the secondaries use an old one.

Downgrading from 6.0 to 5.3 could cause a crash of secondary nodes (using 5.3 binary) caused by an unrecognized field in the oplog entries, i.e., the fromMigrate flag populated by the primary node (using 6.0 binary).

The goal of this ticket is to avoid to set the fromMigrate flag of DurableReplOperation objects when the current FCV is lower than 6.0.



 Comments   
Comment by Githook User [ 16/May/22 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-66423 Set the fromMigrate flag of DurableReplOperation entries only when FCV is 6.0 or greater
Branch: v6.0
https://github.com/mongodb/mongo/commit/082481b93b0304b176d9f82e9c8d1304be85974c

Comment by Antonio Fuschetto [ 11/May/22 ]

The check on the current FCV is based on the following assumptions:

  • The startup recovery (run by downgraded binaries) no longer needs to read old oplog entries written before the FCV downgrade (see SERVER-53643);
  • To ensure that all members of the sharded cluster reflect the updated FCV, the command db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1}) is required to be executed on each replica set member as part of the downgrade procedure.

In that way, it's enough to check that the current FCV is greater or equal to 6.0 before to set the fromMigrate flag of DurableReplOperation objects without any additional syntonization mechanism.

Here there is an interesting discussion with the Replication team about this topic.

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