There are two separate atomic variables for the version and targetVersion fields in serverGlobalParams. There is a potential for a races when reading the actual state through isFullyUpgradedTo36() and similar accessors, which must read both variables separately.
The ServerGlobalParams::FeatureCompatiblity::Version enum should enumerate the following states in one atomic variable. Getters and setters should be appropriately modified.
FeatureCompatibility::Version | fCV version | fCV targetVersion | notes |
---|---|---|---|
kUnset | (unset) | (unset) | a safe getter should return "3.4" |
k34 | 3.4 | (unset) | |
kUpgradingTo36 | 3.4 | 3.6 | |
k36 | 3.6 | (unset) | |
kDowngradingTo34 | 3.4 | 3.4 |