[SERVER-80899] Audit gFeatureFlagCommonQueryFramework Created: 08/Sep/23  Updated: 27/Oct/23  Resolved: 13/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Kyle Suarez Assignee: Hana Pearlman
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-79317 Provide more documentation and helper... Closed
Assigned Teams:
Query Optimization
Sprint: QO 2023-10-02, QO 2023-10-16
Participants:

 Description   

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

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 which should do one of the following:

  • It can never be called when initial sync is running. So 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.
  • It is safe to ignore fcv version so use isEnabledAndIgnoreFCVUnsafe instead (i.e. if the FCV is unintialized during initial sync, the feature flag will be on if it's enabled)
  • It is safe to turn off the feature anytime (even if feature flag is actually on) so use isEnabledUseDefaultFCVWhenUninitialized instead (i.e. if the FCV is unintialized during initial sync, the feature flag will be off, even if it's actually enabled on a later version)
  • Special logic is needed if fcv is not initialized (for example, waiting for the FCV to become initialized before checking isEnabled)


 Comments   
Comment by Hana Pearlman [ 13/Oct/23 ]

Just checked with huayu.ouyang@mongodb.com. These callsites on v7.0 are actually OK to leave as-is, because they all either 1) check if the version is initialized before checking if the feature flag is enabled (for the analyze command) or 2) use isEnabledAndIgnoreFCVUnsafe(). Closing this ticket!

Comment by Kyle Suarez [ 08/Sep/23 ]

Can Query Optimization please take this audit? I know Team Bonsai did some changes to the framework control knobs.

Generated at Thu Feb 08 06:44:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.