Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6e5250f
move-tables: add CLI parameters
danieljoos Jun 10, 2026
968e538
move-tables: add copy query and applier support
danieljoos Jun 11, 2026
ff7ee76
move-tables: implement target-table migration flow
zacharysierakowski Jun 11, 2026
574bec4
move-tables: add cooperative cutover protocol
womoruyi Jun 12, 2026
36de3dd
move-tables: create and validate target tables
womoruyi Jun 12, 2026
dd21581
move-tables: throttle through target credentials
danieljoos Jun 15, 2026
ee60df1
move-tables: expose hook environment variables
danieljoos Jun 16, 2026
25e065b
move-tables: initialize migration configuration
danieljoos Jun 17, 2026
c6d5585
move-tables: enable throttling
danieljoos Jun 18, 2026
e49df8e
move-tables: add crash-safe resume
zacharysierakowski Jun 18, 2026
e946d76
move-tables: clean up migration artifacts
zacharysierakowski Jun 19, 2026
b5df4d1
tests: add move-table integration coverage
chriskirkland Jun 19, 2026
928a4db
move-tables: restore drain GTID on resume
danieljoos Jun 22, 2026
d557a69
move-tables: require source-primary connections
zacharysierakowski Jun 22, 2026
2bd099f
move-tables: report target lag accurately
zacharysierakowski Jun 22, 2026
ff14a7b
tests: cover move-table cutover recovery
chriskirkland Jun 23, 2026
a807397
move-tables: support coordinated multi-table migration
zacharysierakowski Jun 26, 2026
783ef18
Fix generated columns in move-tables mode
ericyan Jul 30, 2026
be1be74
Add generated columns test for move-tables
ericyan Jul 31, 2026
fe71053
Populate column metadata for move-table
ericyan Jul 31, 2026
e990272
Add move-tables unsigned column test
ericyan Jul 31, 2026
a36af50
Add move-tables JSON column test
ericyan Jul 31, 2026
fd8e298
move-tables: ensure target tables are dropped in noop mode
ericyan Aug 18, 2026
ef0d6f1
move-tables: fail on checkpoint initialization errors
ericyan Nov 6, 2026
6910592
move-tables: serialize migrations on the source primary
ericyan Nov 6, 2026
9b6898f
move-tables: require the completed-drain checkpoint
ericyan Nov 6, 2026
20d308e
move-tables: guard resume using source table state
ericyan Nov 6, 2026
e628f9b
move-tables: surface resumed cutover cleanup errors
ericyan Nov 6, 2026
5c66479
move-tables: clarify checkpoint frontier limitations
ericyan Nov 6, 2026
df24bf5
move-tables: register DML listeners before streaming
ericyan Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/move-tables-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: move-tables tests
permissions:
contents: read

on: [pull_request]

jobs:
docker-tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
# - 'mysql/mysql-server:5.7.41' # metadata locks not supported by default? (https://github.com/github/gh-ost/actions/runs/27841216224/job/82401716601?pr=1714)
- 'mysql:8.0.41'
- 'mysql:8.4.3'
- 'percona/percona-server:8.0.41-32'
env:
TEST_MYSQL_IMAGE: ${{ matrix.image }}

steps:
- uses: actions/checkout@v4

- name: Setup environment
run: script/docker-gh-ost-move-tables-tests up

- name: Run tests
run: script/docker-gh-ost-move-tables-tests run

- name: Set artifact name
if: failure()
run: |
ARTIFACT_NAME=$(echo "${{ matrix.image }}" | tr '/:' '-')
echo "ARTIFACT_NAME=test-move-tables-logs-${ARTIFACT_NAME}" >> $GITHUB_ENV

- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: /tmp/gh-ost-test.*
retention-days: 7

- name: Teardown environment
if: always()
run: script/docker-gh-ost-move-tables-tests down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
/.vendor/
.idea/
*.tmp

tools/
*__failpoint_binding__.go
*.go__failpoint_stash__
7 changes: 6 additions & 1 deletion doc/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,20 @@ The following variables are available on all hooks:
- `GH_OST_MIGRATED_HOST`
- `GH_OST_INSPECTED_HOST`
- `GH_OST_EXECUTING_HOST`
- `GH_OST_TARGET_HOST` - the target/applier hostname (in `--move-tables`, this is the target cluster host)
- `GH_OST_HOOKS_HINT` - copy of `--hooks-hint` value
- `GH_OST_HOOKS_HINT_OWNER` - copy of `--hooks-hint-owner` value
- `GH_OST_HOOKS_HINT_TOKEN` - copy of `--hooks-hint-token` value
- `GH_OST_DRY_RUN` - whether or not the `gh-ost` run is a dry run
- `GH_OST_REVERT` - whether or not `gh-ost` is running in revert mode
- `GH_OST_MOVE_TABLES` - whether or not `gh-ost` is running in `--move-tables` mode
- `GH_OST_TARGET_DATABASE_NAME` - operation target database name (in `--move-tables`, this is the explicit target database)
- `GH_OST_TARGET_TABLE_NAME` - operation target table name (mode-dependent)

The following variable are available on particular hooks:
The following variables are available on particular hooks:

- `GH_OST_INSTANT_DDL` is only available in `gh-ost-on-success`. The value is `true` if instant DDL was successful, and `false` if it was not.
- `GH_OST_DRAIN_GTID` is only available in `gh-ost-on-success` and only in `--move-tables` mode. It contains the source `@@gtid_executed` captured immediately after the source `RENAME TABLE` (cutover) and represents the drain target the applier waits for.
- `GH_OST_COMMAND` is only available in `gh-ost-on-interactive-command`
- `GH_OST_STATUS` is only available in `gh-ost-on-status`
- `GH_OST_LAST_BATCH_COPY_ERROR` is only available in `gh-ost-on-batch-copy-retry`
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pingcap/errors v0.11.5-0.20260310054046-9c8b3586e4b2 // indirect
github.com/pingcap/failpoint v0.0.0-20260521055755-e7642935314f // indirect
github.com/pingcap/log v1.1.1-0.20260227082333-572e590d08f1 // indirect
github.com/pingcap/tidb/pkg/parser v0.0.0-20260504140133-511dba1dbe17 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/pingcap/errors v0.11.5-0.20260310054046-9c8b3586e4b2 h1:cLgCk5mwDG9lDH+dPK8TmEliTjyGJwwKN0qevWAl8IY=
github.com/pingcap/errors v0.11.5-0.20260310054046-9c8b3586e4b2/go.mod h1:ktAJCA9lxrHHjVyVl2pKJFvzBnq2eZbb+CUOjBRPlXo=
github.com/pingcap/failpoint v0.0.0-20260521055755-e7642935314f h1:cDo4qNgaQc2POMWTXjNrMA7yySdIF/d1AaW8kOA7qOs=
github.com/pingcap/failpoint v0.0.0-20260521055755-e7642935314f/go.mod h1:jimwlLpI/XtwQdlZML15HS+j4rirvwZM0GLY07wwgOo=
github.com/pingcap/log v1.1.1-0.20260227082333-572e590d08f1 h1:A2bEfgSb7hLwR9mxDszgGKweF+xY9YoTDG+8RjdFjDE=
github.com/pingcap/log v1.1.1-0.20260227082333-572e590d08f1/go.mod h1:pxfz2oJfAuhwrb3/rcLqD//GS/5gRP4gD022iP3cEO0=
github.com/pingcap/tidb/pkg/parser v0.0.0-20260504140133-511dba1dbe17 h1:cfAVPis6GP6lxQgm1WGaNGi4rVXTB4KDvYf96LjqRCM=
Expand Down
Loading
Loading