gh-ost idling on apply error

オープン
#1,730 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 10 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go, mysql
領域
databases

調査の方向性

まず詳細なログ出力で apply エラーを再現し、MySQL エラー 1406 の後で停止する適用済み行の処理経路を追跡します。エラーが明確に報告され、移行の中止または再開の動作が確立され、データが長すぎるケースがカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I was encountering problems when, at random times, gh-ost would just idle while backlogging was filling up, lag and heartbeatlag increasing, no new rows would get copied:

2026-06-26 09:05:27 INFO Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h7m0s(total), 3h6m59s(copy); streamer: dal13-sql21-bin.025288:95132715; Lag: 9236.81s, HeartbeatLag: 9236.81s, State: migrating; ETA: 157h7m35s []
Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h7m30s(total), 3h7m29s(copy); streamer: dal13-sql21-bin.025288:120527768; Lag: 9266.80s, HeartbeatLag: 9266.81s, State: migrating; ETA: 157h32m48s
2026-06-26 09:05:57 INFO Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h7m30s(total), 3h7m29s(copy); streamer: dal13-sql21-bin.025288:120527768; Lag: 9266.80s, HeartbeatLag: 9266.81s, State: migrating; ETA: 157h32m48s []
Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h8m0s(total), 3h7m59s(copy); streamer: dal13-sql21-bin.025288:149082002; Lag: 9296.80s, HeartbeatLag: 9296.81s, State: migrating; ETA: 157h58m1s
2026-06-26 09:06:27 INFO Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h8m0s(total), 3h7m59s(copy); streamer: dal13-sql21-bin.025288:149082002; Lag: 9296.80s, HeartbeatLag: 9296.81s, State: migrating; ETA: 157h58m1s []
Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h8m30s(total), 3h8m29s(copy); streamer: dal13-sql21-bin.025288:172653166; Lag: 9326.71s, HeartbeatLag: 9326.81s, State: migrating; ETA: 158h23m13s
2026-06-26 09:06:57 INFO Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h8m30s(total), 3h8m29s(copy); streamer: dal13-sql21-bin.025288:172653166; Lag: 9326.71s, HeartbeatLag: 9326.81s, State: migrating; ETA: 158h23m13s []
Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h9m0s(total), 3h8m59s(copy); streamer: dal13-sql21-bin.025288:194205311; Lag: 9356.80s, HeartbeatLag: 9356.81s, State: migrating; ETA: 158h48m26s
2026-06-26 09:07:27 INFO Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h9m0s(total), 3h8m59s(copy); streamer: dal13-sql21-bin.025288:194205311; Lag: 9356.80s, HeartbeatLag: 9356.81s, State: migrating; ETA: 158h48m26s []
Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h9m30s(total), 3h9m29s(copy); streamer: dal13-sql21-bin.025288:217244680; Lag: 9386.80s, HeartbeatLag: 9386.81s, State: migrating; ETA: 159h13m38s
2026-06-26 09:07:57 INFO Copy: 7775000/399786193 1.9%; Applied: 39572; Backlog: 1000/1000; Time: 3h9m30s(total), 3h9m29s(copy); streamer: dal13-sql21-bin.025288:217244680; Lag: 9386.80s, HeartbeatLag: 9386.81s, State: migrating; ETA: 159h13m38s []

I tried find out what is happening, but it wasn't throttled, couldn't find any issue for this idling.
So i enabled --verbose and found out that when processing the applied rows it encountered an error which made it just stay there:

2026-06-26 15:25:18 ERROR Error 1406 (22001): Data too long for column 'title' at row 1; query=
                  insert /* gh-ost.....

I think reporting that it encountered an error would be a good idea, and maybe aborting the copying, since there doesn't seem to be any method to resume the process.

主要言語
Go
スター
13.6k
フォーク
1.4k
平均マージ
9日 19時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-ost のほかの issue

github/gh-ost の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。