[SERVER-68051] Create new FeatureFlag helper for setFCV/_runDowngrade Created: 14/Jul/22  Updated: 29/Oct/23  Resolved: 30/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Huayu Ouyang Assignee: Jiawei Yang
Resolution: Fixed Votes: 0
Labels: milestone-2, pm-2821-milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-04-03
Participants:

 Description   

Currently in the setFCV/_runDowngrade logic we sometimes check

!featureFlag.isEnabledOnVersion(requestedVersion) && featureFlag.isEnabledOnVersion(actualVersion) such as here, and sometimes we only check !featureFlag.isEnabledOnVersion(requestedVersion) such as here. We should create a new FeatureFlag helper that checks both !featureFlag.isEnabledOnVersion(requestedVersion) && featureFlag.isEnabledOnVersion(actualVersion), and use that throughout the setFCV command, and standardize that future additions to the setFCV command also use this helper.

Meanwhile in the upgrade path, we only check featureFlag.isEnabledOnVersion(requestedVersion), where should also check if the feature flag is already turned on current version, so we should add another helper function to check for upgrade path featureFlag.isEnabledOnVersion(requestedVersion) && !featureFlag.isEnabledOnVersion(actualVersion)



 Comments   
Comment by Githook User [ 30/Mar/23 ]

Author:

{'name': 'Jiawei Yang', 'email': 'jiawei.yang@mongodb.com', 'username': 'YoungYang0820'}

Message: SERVER-68051 add fromVersion check for upgrade path
Branch: master
https://github.com/mongodb/mongo/commit/cbe9a33ea0f91c9d7deca94aaf0683604e057e6f

Comment by Githook User [ 28/Mar/23 ]

Author:

{'name': 'Jiawei Yang', 'email': 'jiawei.yang@mongodb.com', 'username': 'YoungYang0820'}

Message: SERVER-68051 add fromVersion check in fcv downgrade
Branch: master
https://github.com/mongodb/mongo/commit/c22677bde0b42aa652915ef82610ee850c6cb478

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