Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-88964

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

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: