[SERVER-79317] Provide more documentation and helper functions for case where feature flag checks could be run when FCV is uninitialized during initial sync Created: 25/Jul/23 Updated: 30/Oct/23 Resolved: 30/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0, 7.0.4 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Huayu Ouyang | Assignee: | Huayu Ouyang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | repl-shortlist | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v7.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Specifically we should also look into providing more guidance and helper functions around the situation described in https://jira.mongodb.org/browse/SERVER-79330 (for example, adding a helper function for if the use case needs to wait until FCV is initialized before checking the feature flag, or otherwise providing more documentation) |
| Comments |
| Comment by Githook User [ 27/Oct/23 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: (cherry picked from commit 167a5ba9e3b500dd974b8a797cc44838ae2bcf9c) |
| Comment by Githook User [ 17/Oct/23 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: |
| Comment by Huayu Ouyang [ 05/Oct/23 ] |
|
charlie.swanson@mongodb.com That commit is on 7.1 and the audit should be for 7.0. We are also considering reverting the change since we might not want to make all feature flags use the lastLTS FCV behaviro when the FCV is uninitialized. |
| Comment by Charlie Swanson [ 05/Oct/23 ] |
|
It looks like in commit 27a8e30e8aa02d3f3be35630b970c7b903d1d186 we made a change to have the default behavior of 'isEnabled' match what is documented in 'isEnabledUseDefaultFCVWhenUninitialized()'? The header/definition for that method still exists, but the implementation was deleted in that commit. I think I can just close out my linked ticket |
| Comment by Huayu Ouyang [ 19/Sep/23 ] |
|
charlie.swanson@mongodb.com To clarify, the issue in SERVER-79330 isn't a bug to be fixed in initial sync or FCV code, but just that each feature flag needs to figure out if it's possible for that any feature flag checks to be run during initial sync when the FCV could potentially be uninitialized, and then if it is, figure out what the correct behavior for that feature flag is: either behave as if the feature flag is enabled, regardless of what the real FCV is (isEnabledAndIgnoreFCVUnsafe), behave according to if the feature flag is enabled on the defaultLastLTS (isEnabledUseDefaultFCVWhenUninitialized), or it might need to do some other special logic. For example, we might want to wait until the FCV is initialized, and then check if the feature flag is enabled afterwards, or in We can definitely look into scheduling this ticket to add more guidance around this situation and add helper functions (such as for the case where we want to wait until the FCV is initialized, and then check if the feature flag is enabled). However, we don't think it would be feasible to create a test template or repro script to see if the initial sync race is possible since it's specific to each feature, and it would still be up to each individual feature afterwards to determine whether it could be run during initial sync and what the correct behavior for that feature would be. |
| Comment by Charlie Swanson [ 19/Sep/23 ] |
|
huayu.ouyang@mongodb.com so I'm gathering that this edge case around initial sync in the mentioned linked ticket is not due to some new feature we developed. Is there some sort of recommended test template you could provide? Can we maybe schedule this ticket more urgently? It looks like this epic is not in-progress and instead we've asked a bunch of different engineers across the organization to go gather the necessary context to fix this issue without first publishing some recommendations or any sort of reproduction script.. |
| Comment by Huayu Ouyang [ 19/Sep/23 ] |
|
brenda.rodriguez@mongodb.com Sorry I'm a little unclear about the question, this ticket isn't really describing a specific issue but more that we should audit our use cases of these functions to make sure they're being used properly and make usability improvements. |
| Comment by Charlie Swanson [ 19/Sep/23 ] |
|
huayu.ouyang@mongodb.com can you weigh in? |
| Comment by Brenda Rodriguez [ 14/Sep/23 ] |
|
randolph@mongodb.com is this an issue specifically for 7.0 or does this need to be tested on all future versions for all feature flags? |