Ghostferry misses data for PK values of <= 0
Nadie ha tomado este issue todavía.
- #465 de @driv3r — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 858
- Forks
- 77
- Merge medio
- 10 d 4 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Shopify/ghostferry
-
Gradual copy throttle recoveryAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Shopify/ghostferry#471 · 1 comentario ·
-
Trouble with virtual generated columnsPosiblemente ocupada @driv3r la tomó hace 222 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
Shopify/ghostferry#338 · 7 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Shopify/ghostferry#332 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Shopify/ghostferry#318 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Shopify/ghostferry#306 ·
Todos los issues de Shopify/ghostferry
Issues similares
-
[Bug]: gate 缺失Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
Generated cask uses deprecated `postflight` stanza; Homebrew 7 warns on every commandPosiblemente ocupada @k4kratik la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sachincool/cruft#4 ·
-
help wanted kind/good-first-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
knative/func#4191 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
VictoriaMetrics/VictoriaLogs#1965 ·
Los mantenedores suelen responder en 1 día
-
kind/bug sig/ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
kubermatic/dashboard#8540 · 1 comentario ·
Los mantenedores suelen responder en 1 día