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

Audit gFeatureFlagServerlessChangeStreams

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2023-10-02, QE 2023-10-16, QE 2023-10-30, QE 2023-11-13

      This ticket has been split from an audit of all Query 7.0 feature flags. This ticket is a request to audit gFeatureFlagServerlessChangeStreams.

      Intial sync can temporarily reset the fcv value to uninitialized and sets the new value afterwards. This can cause call sites trying to inspect the fcv value to hit this invariant. We need to audit feature flag usage and determine if the feature flag check can be run during initial sync:

      If it can never be called when initial sync is running, do nothing. Note that this can be tricky to prove as we once thought the catalog cache loader can never be run while initial sync is happening but it can.

      If it might get run during initial sync, this could be the case if the feature is run during initial sync itself, if the feature is in a background thread that runs during initial sync, or if the feature is run in a command that is allowed during initial sync, such as hello, serverStatus, etc. In this case, use one of these options:

      • Use isEnabledUseLastLTSFCVWhenUninitialized. It checks against the last LTS FCV version if the FCV version is unset, but note that this could result in the feature not being turned on even though the FCV will be set to latest once initial sync is complete.
      • Use isEnabledUseLatestFCVWhenUninitialized. This instead checks against the latest FCV version if the FCV version is unset, but note that this could result in the feature being turned on even though the FCV has not been upgraded yet and will be set to lastLTS once initial sync is complete.
      • Write your own special logic to avoid the invariant (for example, waiting for the FCV to become initialized before checking isEnabled, or uasserting instead of invariant-ing)

      See this section of the README

            Assignee:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Reporter:
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: