Ghostferry misses data for PK values of <= 0
Nessuno ha ancora preso questa issue.
- #465 di @driv3r — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the DataIterator and DefaultBuildSelect/BuildSelect functions to trace how the first batch bounds primary-key values. Review the related BinlogStreamer, InlineVerifier, and BinlogWriter behavior described in the issue. Done means pre-existing rows with primary-key values -1 and 0 are handled or an explicit loading error is raised, with tests covering the affected cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
If a table t has a single column id bigint(20) (also the PK) with records -1, 0, 1, 2, 3. Ghostferry will silently not copy data where id <= 0. There are two related causes:
- For the negative number case, this is because Ghostferry assumes that the PK is an
uint64. - For the 0 case, the
DefaultBuildSelectselects rows where PK > 0 in the first iteration, which misses the record for 0.
This only happens if Ghostferry is started and these records already exists in the database as only the DataIterator misses these records. The BinlogStreamer will stream these records if they are inserted. This also means the InlineVerifier will miss these records as well and will not emit an error unless these records are also UPDATEd during the course of the transfer. When the record is updated, since it doesn't exist on the target, the BinlogWriter won't be able to update it (as the previous state on the target database doesn't match what the binlog event suggests). This means the row will be added to a reverify queue. The subsequent fingerprinting attempt will always yield different result from the source and the target. This means that there is a chance for the InlineVerifier to catch this (which is how we found it), but it is not guaranteed.
The first case is hard to fix. Perhaps we should detect such record exists and raise an error during table loading. For the 0 case, we need to review the BuildSelect functions to make sure that 0 can be included.
- Lingua principale
- Go
- Stelle
- 858
- Fork
- 77
- Merge medio
- 10g 4h
- PR unite (30g)
- 4
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 Shopify/ghostferry
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
Shopify/ghostferry#471 · 1 commento ·
-
Trouble with virtual generated columnsForse già presa @driv3r l’ha presa 222 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
Shopify/ghostferry#338 · 7 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Shopify/ghostferry#332 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Shopify/ghostferry#318 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Shopify/ghostferry#306 ·
Tutte le issue di Shopify/ghostferry
Issue simili
-
[Bug]: gate 缺失Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Generated cask uses deprecated `postflight` stanza; Homebrew 7 warns on every commandForse già presa @k4kratik l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
sachincool/cruft#4 ·
-
help wanted kind/good-first-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
knative/func#4191 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
VictoriaMetrics/VictoriaLogs#1965 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug sig/ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
kubermatic/dashboard#8540 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno