affinity: resynchronize in-memory metadata after an ambiguous etcd transaction error
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- databases, distributed-systems
Direzione di ricerca
Start with runGroupOpsInTxn, CreateAffinityGroups, and UpdateAffinityGroupKeyRanges, then trace how affinity groups, keyRanges, and RegionLabeler are updated and how validateNoOverlapLocked checks them. Reproduce or study an ambiguous RunInTxn error where the transaction commits but returns an error; done means in-memory metadata reflects that transaction before subsequent requests are validated, so overlapping ranges are rejected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Report
What did you do?
When CreateAffinityGroups or UpdateAffinityGroupKeyRanges executes a batch through runGroupOpsInTxn, an etcd transaction (RunInTxn) can commit on Raft while returning a client error (for example, context.DeadlineExceeded or a transport disconnect before the commit response arrives).
After #11501, runGroupOpsInTxn publishes the prefix of transactions whose commit calls returned nil and treats the transaction that returned an error as uncommitted.
What did you expect to see?
Before validating subsequent affinity group creations or key range updates, PD should ensure its in-memory affinity groups, keyRanges, and RegionLabeler rules reflect any transaction whose commit outcome was ambiguous, without waiting for a retry to overwrite the affected keys or for PD leadership to reload metadata.
What did you see instead?
Until a retry reapplies the affected operations or PD reloads metadata on restart or leader change, PD's in-memory state omits the changes from the ambiguous transaction. Because validateNoOverlapLocked checks incoming ranges against in-memory keyRanges, a subsequent request overlapping those persisted ranges can be accepted into storage.
Note: #11501 already ensures that persisted overlapping ranges do not block PD startup and automatically suspends affinity scheduling for conflicting groups (both on PD reload and via scheduling service watchers) until the overlap is repaired. This issue tracks recovering PD's in-memory metadata after an ambiguous transaction error so such overlaps are rejected up front.
What version of PD are you using (pd-server -V)?
master (with #11501, commit 207d8395269edc979b4111b3f4e0fdc858aa008d).
- Lingua principale
- Go
- Stelle
- 1.2k
- Fork
- 794
- Merge medio
- 5g 32m
- PR unite (30g)
- 81
Preparare l'ambiente
- Include un Dockerfile o un 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 tikv/pd
-
needs-type
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
contribution type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
type/ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
affects-8.5 contribution needs-type
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
contribution type/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
agent-in-progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jordansmall/spindrift#7716 ·
I maintainer di solito rispondono entro 1 giorno
-
bug 🪲 needs-triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Azure/azure-service-operator#5880 ·
I maintainer di solito rispondono entro 1 giorno
-
`create_branch` returns a bare 404 when the token has no push accessForse già presa @aloneangel45 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/github-mcp-server#3994 ·
I maintainer di solito rispondono entro 2 giorni
-
Add rebaseWhen: conflicted to major Go module Renovate updatesForse già presa @WadekarPrashant l’ha presa oggi. Apertaenhancement feature good first issue ready-for-triage triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
konflux-ci/build-definitions#3943 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno