Operational Defect Database

BugZero found this defect 46 days ago.

MongoDB | 2631776

featureFlagRecordIdsReplicated check should be done while under the global lock in IX

Last update date:

4/3/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Backlog

Learn More

Search:

...