[SERVER-79590] [Storage Execution EMEA] Audit v7.0 feature flag Created: 01/Aug/23 Updated: 31/Oct/23 Resolved: 11/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.3 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Connie Chen | Assignee: | Haley Connelly |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution EMEA
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Execution EMEA Team 2023-09-04, Execution EMEA Team 2023-09-18, Execution EMEA Team 2023-10-02, Execution EMEA Team 2023-10-16 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
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:
gfeatureFlagCappedCollectionsRelaxedSize |
| Comments |
| Comment by Haley Connelly [ 11/Oct/23 ] |
|
gfeatureFlagCappedCollectionsRelaxedSize is checked in 2 places in 7.0 (1) adjustCappedSize() - OK as is, same behavior as using isEnabledUseDefaultFCVWhenUninitialized(). Before checking if the feature flag is enabled, it checks if FCV is initialized, thus it shouldn't hit the invariant. If the node is undergoing initial sync and FCV isn't set, a capped collection's maxSize wont be rounded to 256. This is fine, since the capped collection will be cloned from an existing node in the replica set - and thus abide by the sizing rules for the replica sets FCV. (2) _userCollectionsUassertsForDowngrade() - OK as is. The feature flag is checked with isDisabledOnTargetFCVButEnabledOnOriginalFCV(originalVersion, requestedVersion). The 'originalVersion' passed in is generated at the start of _userCollectionsUassertsForDowngrade. The entire function would fail the isUpgradingOrDowngrading() invariant if the FCV version weren't initialized. Thus, the feature flag check is unreachable if the fcv is uninitialized when storing the 'originalVersion'. |
| Comment by Haley Connelly [ 03/Oct/23 ] |
|
gFeatureFlagGlobalIndexes isn't enabled and won't be until future projects (see this comment). For now, there isn't a direct risk of it causing an error in production. In later versions, it can be revisited when the feature flag is enabled. |