-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
We perform the featureFlag check here, when we're not holding the global lock.
However, this means that after the check has run, but before we actually proceed and try to create the collection, an FCV downgrade operation can run and leave us in the fully downgraded state. But since we've already performed the featureFlag check, we will create a collection with options that are invalid on the lower FCV.
Holding the global lock is important when we perform a featureFlag check. This is because FCV upgrade / downgrade uses the global lock to ensure that no operation can see the upgraded & downgraded states in its lifetime.
Also mentioned in the FCV README:
This also means that in order to make this barrier truly safe, if we want to ensure that the FCV does not change during our operation, you must take the global IX or X lock first, and then check the feature flag/FCV value after that point
- related to
-
SERVER-90971 Secondaries should call into lower level create collection API during oplog application
- Backlog
-
SERVER-88965 FeatureFlag checks must be performed while holding the global lock in IX / X if data can be written in a new format
- Closed
-
SERVER-89634 Enable tests that concurrently perform DDL and setFCV operations on the recordIdsReplicated:true variant
- Closed
- split to
-
SERVER-91214 Storage Execution: Audit feature flag checks for unsafe races with setFCV
- Closed