--attempt-instant-ddl caused process hangs

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

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

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

評価

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

調査の方向性

Start by running the supplied gh-ost command against Aurora MySQL 8.0.42 and trace shutdown after the “syncer is closing” and “kill last connection” log lines. Reproduce the hang and identify why the process remains alive with an open MySQL connection; done means the process exits and the connection closes after a successful instant DDL.

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

説明

gh-ost 1.1.11
aws aurora mysql 8.0.42

when --attempt-instant-ddl succeeds, the process sometimes does not exit. The binlog syncer starts closing, and the last connection is killed, but the gh-ost process remains alive and the MySQL connection stays open until it is manually interrupted.

cmd

./gh-ost --user=root --password='xx' --host=xxx.rds.amazonaws.com --port=3306 \
--database=testdb1 --table=xxx \
--alter="ADD COLUMN id4 INT COMMENT 'a'" \
--assume-master-host=xxx:3306 --default-retries=60 \
--cut-over=atomic --ok-to-drop-table --assume-rbr --allow-on-master \
--max-load=Threads_running=300 --critical-load=Threads_running=3000 \
--chunk-size=2000 --max-lag-millis=2000 \
--skip-metadata-lock-check \
--verbose --execute --attempt-instant-ddl --nice-ratio=0

log

2026-09-21 11:57:09 INFO Applier initiated on ip-xxx:3306, version 8.0.42
2026-09-21 11:57:09 INFO Acquired migration lock gh-ost::testdb1.xxx
2026-09-21 11:57:09 INFO Dropping table `testdb1`.`_xxx_ghc`
2026-09-21 11:57:09 INFO Table dropped
2026-09-21 11:57:09 INFO Creating changelog table `testdb1`.`_xxx_ghc`
2026-09-21 11:57:09 INFO Changelog table created
2026-09-21 11:57:09 INFO Creating ghost table `testdb1`.`_xxx_gho`
2026-09-21 11:57:30 INFO Ghost table created
2026-09-21 11:57:30 INFO Altering ghost table `testdb1`.`_xxx_gho`
2026-09-21 11:57:36 INFO Ghost table altered
2026-09-21 11:57:36 INFO Intercepted changelog state GhostTableMigrated
2026-09-21 11:57:36 INFO Attempting to execute alter with ALGORITHM=INSTANT
2026-09-21 11:57:36 INFO INSTANT DDL query is: ALTER /* gh-ost */ TABLE `testdb1`.`xxx` ADD COLUMN id4 INT COMMENT 'a', ALGORITHM=INSTANT
2026-09-21 11:57:36 INFO Setting LOCK timeout as 6 seconds
2026-09-21 11:57:46 INFO Writing changelog state: Migrated
2026/09/21 11:57:46 INFO syncer is closing...
2026/09/21 11:57:46 INFO kill last connection id=3564340



# I used Ctrl+C to cancel it.
^C
主要言語
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 を短くまとめたダイジェスト。