Potential concurrency bugs in ConfigManager
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia individuando ConfigManager e i punti in cui vengono chiamati GetConfig e WatchConfig. Esamina come vengono gestiti l’inizializzazione, il blocco delle notifiche e il ciclo di vita del watcher; il lavoro sarà considerato completato quando sarà disponibile un design concordato che affronti gli aggiornamenti persi, i moduli bloccati e la disiscrizione, insieme ai test corrispondenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Development Task
ConfigManager notifies other modules with the config change by a channel. There are some bugs:
- When a module starts, it must receive an initial config and a channel as its parameters, such as
someModule.Init(cfgMgr.GetConfig(), cfgMgr.WatchConfig()). However, between callingGetConfig()andWatchConfig(), there may be a config change, and thussomeModulemay miss this config change. ConfigManagernotifies all the modules by writing to the channels when config changes. If one module blocks (maybe forever or temporarily), it hangs. If the module blocks forever, such as deadlock or panic, the config change will block forever. But if you add a timeout on writing the channel, the module may miss the config change if it just blocks temporarily, such as busy handling other things.- There's no way to unsubscribe from
ConfigManagerafter callingWatchConfig(). If a module wants to quit,ConfigManagerwill still try to notify it.
For the 1st problem, one workaround is calling WatchConfig() after GetConfig().
For the 2nd problem, one workaround is to set the channel size to a big enough size and also set a timeout on writing the channel.
For the 3rd problem, one workaround is to add another function to unsubscribe.
If we deprecate the WatchConfig() way and always use GetConfig(), all problems will be solved.
- Lingua principale
- Go
- Stelle
- 73
- Fork
- 41
- Merge medio
- 12h 38m
- PR unite (30g)
- 21
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pingcap/tiproxy
-
contribution first-time-contributor type/enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
pingcap/tiproxy#1239 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
type/enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
severity/minor type/bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
type/bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pingcap/tiproxy
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
prime-radiant-inc/evener#3873 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
pion/interceptor#479 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
yetone/magpie#1035 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Project submission: 5diveAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
slavakurilyak/awesome-ai-agents#710 ·
I maintainer di solito rispondono entro 1 giorno
-
`renderLinkedIssues` overshoots its byte budget: unresolved and omitted lists are never boundedApertaagent-butler-finding agent-research-recommend bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jordansmall/spindrift#4614 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno