Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lagging replicas should not affect WaitSlaveCount #136

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

teem0n
Copy link
Contributor

@teem0n teem0n commented Oct 1, 2024

If all replicas are lagging - mysync enables semi-sync on master and it will stuck in following way:

WARN: calc active nodes: replica_1 has data lag 92799618, but it's IO is working. Old binlog: mysql-bin-log-master.0027440000000000265253468, new binlog: mysql-bin-log-master.0027540000000000000000237
WARN: calc active nodes: replica_2 has data lag 92799851, but it's IO is working. Old binlog: mysql-bin-log-master.0027450000000000000005651, new binlog: mysql-bin-log-master.0027540000000000000000004
INFO: update active nodes: active nodes are: [master replica_1 replica_2], wait_slave_count 1
INFO: update active nodes: master change wait_slave_count: 0 => 1
DEBUG: node master running query 'SELECT 1 AS Ok' with args struct {}{}, result: &mysql.pingResult{Ok:1}, error: <nil>
DEBUG: node master running query 'SET GLOBAL rpl_semi_sync_master_enabled = 1, rpl_semi_sync_slave_enabled = 0' with args map[string]interface {}{}, result: <nil>, error: <nil>
DEBUG: node replica_1 running query 'SET GLOBAL rpl_semi_sync_slave_enabled = 0, rpl_semi_sync_master_enabled = 0' with args map[string]interface {}{}, result: <nil>, error: <nil>
DEBUG: node replica_2 running query 'SET GLOBAL rpl_semi_sync_slave_enabled = 0, rpl_semi_sync_master_enabled = 0' with args map[string]interface {}{}, result: <nil>, error: <nil>

@teem0n teem0n merged commit 4a012aa into master Oct 3, 2024
52 checks passed
@teem0n teem0n deleted the feature/lagging_replicas_not_active branch October 3, 2024 05:53
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