-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
Fully Compatible
-
Repl 2023-04-03
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)