MySQL Named Channels Support
Orchestrator currently assumes single-source replication (one MasterKey per replica). MySQL multi-source replication with named channels breaks this assumption at every layer.
Current failures
- Discovery: only the last row from
SHOW REPLICA STATUS survives
CHANGE REPLICATION SOURCE TO fails with error 3077 on multi-source replicas
STOP/START REPLICA affects all channels, not just the intended one
- Topology graph misplaces multi-source replicas
- Failover breaks other channels when promoting a multi-source replica
Implementation plan
Phase 1: Data model — ChannelStatus struct, database_instance_channels table, Instance struct extension
Phase 2: Discovery — Parse all SHOW REPLICA STATUS rows, store per-channel, choose canonical MasterKey
Phase 3: Channel-aware operations — All replication commands get FOR CHANNEL variants
Phase 4: Topology & visualization — Handle multi-parent nodes in topology graph and web UI
Phase 5: Failover — Channel-aware recovery that preserves non-managed channels
Phase 6: Testing — Functional tests with multi-source MySQL topology in CI
See detailed research in the implementation branch.
MySQL Named Channels Support
Orchestrator currently assumes single-source replication (one MasterKey per replica). MySQL multi-source replication with named channels breaks this assumption at every layer.
Current failures
SHOW REPLICA STATUSsurvivesCHANGE REPLICATION SOURCE TOfails with error 3077 on multi-source replicasSTOP/START REPLICAaffects all channels, not just the intended oneImplementation plan
Phase 1: Data model —
ChannelStatusstruct,database_instance_channelstable, Instance struct extensionPhase 2: Discovery — Parse all
SHOW REPLICA STATUSrows, store per-channel, choose canonical MasterKeyPhase 3: Channel-aware operations — All replication commands get
FOR CHANNELvariantsPhase 4: Topology & visualization — Handle multi-parent nodes in topology graph and web UI
Phase 5: Failover — Channel-aware recovery that preserves non-managed channels
Phase 6: Testing — Functional tests with multi-source MySQL topology in CI
See detailed research in the implementation branch.