[SERVER-79274] FCV checks can be racy if FCV is uninitialized in between the checks Created: 24/Jul/23 Updated: 16/Nov/23 Resolved: 08/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0, 7.2.0-rc2, 7.0.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | 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 | ||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v7.2, v7.0, v6.0, v5.0, v4.4
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Repl 2023-09-04, Repl 2023-10-30, Repl 2023-11-13 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 153 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
For places in the codebase where we check the FCV in multiple places, this can be racy. For example, in FeatureFlag::isEnabled, And example case where fcv can be uninitialized is when intial sync temporarily resets the value to uninitialized and sets the new value afterwards. This also applies to FCVServerStatusMetrics::generateSection and other instances where we check if FCV is initialized and then another FCV check that re-gets the FCV. |
| Comments |
| Comment by Githook User [ 14/Nov/23 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: |
| Comment by Githook User [ 14/Nov/23 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: (cherry picked from commit a5da6271d5fd5afb83d0c90a0f641d006862494e) |
| Comment by Githook User [ 08/Nov/23 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: |