--attempt-instant-ddl caused process hangs

未关闭
#1,774 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 10 天内回复

还没有人认领这个 Issue。

评估

难度
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 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-ost 的其他 Issue

查看 github/gh-ost 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。