*: a better design for concurrent access of GlobalConfig #30366
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
sig/sql-infra
SIG: SQL Infra
type/enhancement
The issue or PR belongs to an enhancement.
Enhancement
Currently, the GlobalConfig is loaded from the configuration file and can be modified('dynamic config') after that, several fields are wrapped with an atomic operation helper to avoid data race issues, for example:
tidb/sessionctx/variable/sysvar.go
Line 1608 in cec4acb
But it can be vulnerable, for example:
#30345 is introduced by #29247 but it is really hard for the developers to realize the race issue. In order to solve it, an atomic wrapper is introduced in #30346.
IMO this may easily happen before we find a systematic way to solve it, possible alternatives are:
The text was updated successfully, but these errors were encountered: