FAQ: document read-your-writes behavior in the stale cache entry
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go, kubernetes
- Ambito
- documentation
Direzione di ricerca
L'obiettivo è la voce « My cache might be stale if I read from a cache! » in FAQ.md. Leggi la documentazione su cache e client per client.New e cluster.Options.Client, e verifica Cluster.GetAPIReader(), client.Options.Cache.EnableReadYourWritesConsistency e l'opzione per richiesta DisableReadYourWritesConsistency rispetto a designs/read_your_own_write_client.md. Il lavoro è completato quando la voce include un breve esempio di scrittura seguita da lettura, un rimando a GetAPIReader() e una nota sulle opzioni di consistenza, dichiarando lo stato sperimentale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The "My cache might be stale if I read from a cache!" entry in FAQ.md covers optimistic locking and deterministic names. It doesn't say anything about a write in one Reconcile triggering the next one before the cache has caught up.
I hit this in an operator on controller-runtime v0.19.0. A scale-down cooldown timestamp lives in status. The Reconcile wrote spec.replicas first, which enqueued another Reconcile right away; that one read status from the cache, still without LastScalingAt, and treated the cooldown as unset. Replicas went 3 -> 2 -> 1 inside one sampling window. Writing status before spec fixed it, because watch events arrive in resourceVersion order.
Raw samples are in data-run4-double-step-race.csv. The fix and the comment above it are in app_controller.go.
client.New and cluster.Options.Client document that the default client reads through the cache and writes directly to the API server. Cluster.GetAPIReader() gives you an uncached reader. There is also client.Options.Cache.EnableReadYourWritesConsistency (off by default, marked experimental, see designs/read_your_own_write_client.md) and the per-request DisableReadYourWritesConsistency option. The stale cache entry says information "will eventually be correct, but may be slightly out of date"; the testing entry says changes "may have some delay between write time and reconcile time". Neither mentions the ordering issue or any of those options.
I'd suggest extending the stale cache entry with a short example of writing in one Reconcile and reading in the next, a pointer to GetAPIReader(), and a mention of the consistency options. Happy to send a PR for FAQ.md if that sounds reasonable.
Related: #3320 is the feature issue. I'm only asking about documenting what's already released.
Observed on controller-runtime v0.19.0 (k8s.io v0.31.1). The consistency options landed in v0.25.
- Lingua principale
- Go
- Stelle
- 3k
- Fork
- 1.3k
- Merge medio
- 1g 7h
- PR unite (30g)
- 48
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 kubernetes-sigs/controller-runtime
-
lifecycle/rotten
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kubernetes-sigs/controller-runtime#3537 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Read-your-writes consistency is not applied to unstructured objects written with Update or PatchForse già presa @7616e5a9c573ffb221843a498885ab0f l’ha presa 1 giorno fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
kubernetes-sigs/controller-runtime#3702 ·
I maintainer di solito rispondono entro 1 giorno
-
Client and DynamicRESTMapper keep a kind's old scope after its CRD is recreated with a different `scope`Forse già presa @AdamMagued l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
kubernetes-sigs/controller-runtime#3671 ·
I maintainer di solito rispondono entro 1 giorno
-
ReadYourWrite doesn't correctly deal with mutating requests removing the last finalizerForse già presa @AdamMagued l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
kubernetes-sigs/controller-runtime#3670 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
With UsePriorityQueue=false, a stopped controller starts queued reconciles after cancellationForse già presa @hcrosse l’ha presa 14 giorni fa. Apertakind/bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
kubernetes-sigs/controller-runtime#3664 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di kubernetes-sigs/controller-runtime
Issue simili
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BaaRai/ARTEX#652 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 1 giorno
-
Add govulncheck workflowApertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
losisin/helm-values-schema-json#437 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni