-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.0.16, 7.3.3, 7.0.12, 5.0.28, 8.0.0-rc13
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
v8.0, v7.3, v7.0, v6.0, v5.0
-
-
CAR Team 2024-07-08, CAR Team 2024-07-22
-
0
The _refreshBalancerSettings function reads from the config server and constructs the new setting object outside the mutex, and then swaps it under the mutex.
In the presence of multiple threads doing refreshes, an interleaving where:
- Thread1 has created a BalancerSettingsType at T(1)
- Thread2 creates a BalancerSettingsType at T(2) and performs the swap
- Thread1 performs the swap with BalancerSettingsType for T(1)
This causes the BalancerConfiguration to go back in time.
A particular example is the Balancer thread, which performs a refresh in each round, interleaving with a _configsvrBalancerStatus refreshing to report status.
We should also check _refreshChunkSizeSettings and _refreshAutoMergeSettings.