Skip to content

--attempt-instant-ddl caused process hangs #1774

Description

@NoskyOrg

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions