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

Semi-sync is not enforced on primary when it restarts and when failover doesn't happen #1270

Open
pedroalb opened this issue Nov 19, 2020 · 2 comments

Comments

@pedroalb
Copy link

Hi Shlomi!
Hope you're doing well.

I came across the following behaviour:
When semi-sync is enforced at orchestrator level, orchestrator does not set the primary node with rpl_semi_sync_master_enabled=1 on primary restart (when failover doesn't happen).

Orchestrator configuration for semi-sync:
"DetectSemiSyncEnforcedQuery": "SELECT @@global.rpl_semi_sync_slave_enabled AND @@global.rpl_semi_sync_master_timeout >= 1000000;"

All of our nodes have this enforced:
MariaDB [(none)]> SELECT @@global.rpl_semi_sync_slave_enabled AND @@global.rpl_semi_sync_master_timeout >= 1000000; +-------------------------------------------------------------------------------------------+ | @@global.rpl_semi_sync_slave_enabled AND @@global.rpl_semi_sync_master_timeout >= 1000000 | +-------------------------------------------------------------------------------------------+ | 1 | +-------------------------------------------------------------------------------------------+

We deploy our clusters with rpl_semi_sync_master_enabled=0 as default and set rpl_semi_sync_master_enabled=1 at runtime in the current primary. Whenever there's a failover (manual or automatic), orchestrator takes care of setting rpl_semi_sync_master_enabled=1 at runtime in the new primary and rpl_semi_sync_master_enabled=0 to the old primary.
However, if primary is restarted and there's no failover, orchestrator does not enforce rpl_semi_sync_master_enabled=1 on the primary.

Do you think it makes sense for orchestrator to be routinely enforcing rpl_semi_sync_master_enabled=1 on the primary?

Thanks,
Pedro.

@pedroalb pedroalb changed the title Semi-sync is not enforced on primary restart when failover doesn't happen Semi-sync is not enforced on primary when it restarts and when failover doesn't happen Nov 19, 2020
@shlomi-noach
Copy link
Collaborator

Ouch, completely missed this.

@shlomi-noach
Copy link
Collaborator

Hopefully some discussion to follow on #1360

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

No branches or pull requests

2 participants