Ghostferry misses data for PK values of <= 0
まだ誰も着手していません。
- #465 @driv3r による — マージされずにクローズ
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 858
- フォーク
- 77
- 平均マージ
- 10日 4時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Shopify/ghostferry のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
Shopify/ghostferry#471 · コメント 1 件 ·
-
Trouble with virtual generated columns対応中かも @driv3r が 222 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
Shopify/ghostferry#338 · コメント 7 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
Shopify/ghostferry#332 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Shopify/ghostferry#318 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
Shopify/ghostferry#306 ·
Shopify/ghostferry の issue をすべて見る
似ている issue
-
[Bug]: gate 缺失オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
Generated cask uses deprecated `postflight` stanza; Homebrew 7 warns on every command対応中かも @k4kratik が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sachincool/cruft#4 ·
-
help wanted kind/good-first-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
knative/func#4191 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
VictoriaMetrics/VictoriaLogs#1965 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug sig/ui
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
kubermatic/dashboard#8540 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信