The methods just check specific values for the enum. We should either make the enum definition private or remove the functions.
------
Make the class behave like this:
struct FeatureCompatibility { enum class Version { kFullyDowngradedTo34, kUpgradingTo36, kFullyUpgradedTo36, kDowngradingTo34, kUnsetIn36 }; const Version getVersion() const { return _version.load(); } void reset() { _version.store(Version::k34); } void setVersion(Version version) { // enforce state transitions return _version.store(version); } const bool isSchemaVersion36() { return (isFullyUpgradedTo36() || isUpgradingTo36()); } private: AtomicWord<Version> _version{Version::kUnset}; } featureCompatibility;
- depends on
-
SERVER-31438 Remove featureCompatibilityVersion parameter for IndexDescriptor::getDefaultIndexVersion
- Closed
- is related to
-
SERVER-31607 Remove FeatureCompatibilityVersionInfo struct
- Closed
- related to
-
SERVER-30745 Prohibit unsafe comparisons against feature compatibility version
- Closed