injectHeartbeat writing failed on teardown

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go, mysql
領域
database

調査の方向性

go/logic/migrator.go の finalCleanup と teardown から始め、dry-run フロー中に injectHeartbeat が停止される箇所を追跡します。遅いクリーンアップまたは大きなスキーマで再現し、報告されている teardown エラーなしに、_ghc テーブルが削除される前に heartbeat の書き込みが停止することを確認します。

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

説明

bug

Hi all!

Environment:
Azure Mysql Flexible Sever, 8.0.44-azure
gh-ost 1.1.8

We have an instance with a number of partitioned tables and a large schema metadata. With this setup, the dry run check fails with the following errors (from the first to the last):

Closed streamer connection. err=<nil>
Dropping table `<redacted>_ghc`
Table dropped
Error 1146 (42S02): Table '<redacted>_ghc' doesn't exist
...
Error 1146 (42S02): Table '<redacted>_ghc' doesn't exist
...
injectHeartbeat writing failed 61 times, last error: Error 1146 (42S02): Table '<redacted>_ghc' doesn't exist

It appears that on slow disks/thousands of tables, finalCleanup is executed too early and drops the table before teardown (where injectHeartbeat actually stops). And deleting a '_ghc' table takes longer than default-retries (60) * heartbeat-interval-millis (100 ms).

Currently, this can be fixed by increasing default-retries or heartbeat-interval-millis (or both), but this seems like a workaround.

Is it possible to fix the order of execution?

Thanks in advance!

主要言語
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 を短くまとめたダイジェスト。