Multi-flavor docker replica-test harness#1722
Merged
Merged
Conversation
Rework the replica-test harness to run the localtests suite against MySQL 5.7, 8.0, 8.4 and Percona Server 8.0 from one parameterized setup. - Move docker-compose into script/ and split per-version server config into docker/<flavor>-<major.minor>/ dirs (common.cnf, create_user.sql, start_replication.sql), selected from TEST_MYSQL_IMAGE. Optional flavor.env per dir for knobs (Percona reads /etc/my.cnf.d). - Configure replication from the harness once both servers are up rather than at container init, so that replica connects on the first try. - Keep mysql_native_password for 5.7/8.0/percona, caching_sha2_password for 8.4. - Speed-ups: native mysql client with docker-exec fallback, detect server version once, shorter replication polls, configurable copy-throttle window (THROTTLE_SECONDS, default 2s to still exercise binlog DML replay). - toxiproxy split into its own compose file.
meiji163
approved these changes
Jun 22, 2026
Contributor
|
HI 👋 thanks for your contribution! It would be great to officially support MariaDB |
Contributor
Author
|
Wow, that was super fast! Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Hey 👋
First of all, thanks for the awesome tool, it was a real saver for our quite big db with not-so-great schema, I really appreciate it.
This is a pre-requisite for adding MariaDB support to gh-ost, which comes in the next PR if this one goes well.
I decided to ship this set of changes first because it was quite hard to untangle the needs of different MySQL flavours.
Mandatory AI disclaimer
Obviously, I heavily used Claude during the work on this PR, but it's not just some blindly vibe-coded change.
I did a manual code review (several times) and tried to keep the amount of changes to the minimum.
Also it is worth to mention that I heavily tested it locally across all versions specified in Github Actions.
tl;dr
Run the tests with
TEST_MYSQL_IMAGE=mysql:8.4.3 ./script/docker-gh-ost-replica-tests up TEST_MYSQL_IMAGE=mysql:8.4.3 ./script/docker-gh-ost-replica-tests run TEST_MYSQL_IMAGE=mysql:8.4.3 ./script/docker-gh-ost-replica-tests down # don't forget to specify TEST_MYSQL_IMAGETEST_MYSQL_IMAGEcan be any MySQL flavour specified in.github/workflows/replica-tests.yml.Description
I tried to make replica-test harness to be easily extendable across different MySQL versions and flavours, such as Percona and (not yet available here) MariaDB, so in case there's a need to support some other version with slightly different values, only
docker/scriptfolder will need some tuning and not the whole testing harness.Rework the replica-test harness to run the localtests suite against MySQL 5.7, 8.0, 8.4 and Percona Server 8.0 from one parameterized setup.