Skip to content

Fix mixed version topology discovery - #1760

Merged
jakubpliszka merged 1 commit into
masterfrom
jakubpliszka/fix-mixed-version-topology
Aug 26, 2026
Merged

Fix mixed version topology discovery#1760
jakubpliszka merged 1 commit into
masterfrom
jakubpliszka/fix-mixed-version-topology

Conversation

@jakubpliszka

Copy link
Copy Markdown
Contributor

Description

This PR adds per-server MySQL version detection while gh-ost walks the inspector’s upstream replication chain, ensuring that each visited server uses the appropriate replication terminology.

gh-ost previously selected replication terminology using the inspector's MySQL version and reused that version while recursively walking upstream.

In a mixed-version topology, this could issue syntax for one MySQL version against another. For example, an 8.0 inspector caused gh-ost to run SHOW SLAVE STATUS against an 8.4 primary, where that statement is no longer supported.

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

Copilot AI balanced review requested due to automatic review settings August 26, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds per-server MySQL version detection during upstream topology discovery, preventing incompatible replication syntax in mixed-version deployments.

Changes:

  • Detects each visited server’s version before querying replication status.
  • Propagates topology-discovery errors during replication restart.
  • Adds mixed-version, MariaDB, and error-path tests.
Show a summary per file
File Description
go/mysql/utils.go Uses each topology node’s version for replication terminology.
go/mysql/utils_test.go Tests mixed-version discovery and failures.
go/logic/inspect.go Returns replication-status discovery errors.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@jakubpliszka
jakubpliszka merged commit 9725ea9 into master Aug 26, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants