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

Remove failover #931

Merged
merged 4 commits into from
Nov 11, 2024
Merged

Remove failover #931

merged 4 commits into from
Nov 11, 2024

Conversation

dveeden
Copy link
Collaborator

@dveeden dveeden commented Oct 26, 2024

The failover part of go-mysql does failover in case of the failure of a primary in a MySQL topology and it also refactors the topology by changing replication on hosts to make sure they follow the new primary.

However there are various issues with this:

  1. This is not production ready according to failover/doc.go
  2. This uses the master/slave terms instead of source/primary/replica.
  3. This uses statements that have changed in recent MySQL versions (SHOW MASTER..., CHANGE MASTER..., SHOW SLAVE...)
  4. MariaDB support looks incomplete. There is a MariadbGTIDHandler but Failover() returns an error if the flavor is set to MariaDB.
  5. There are better solutions for HA like Orchestrator, MySQL Group Replication (part of InnoDB Cluster), Galera and TiDB.
  6. The code has a lack of timeouts.
  7. This doesn't support multiple levels of replicas.

I think we should remove this unless there is a good use case for this that warrants keeping this and refactoring this completely.

Related

@lance6716
Copy link
Collaborator

(Wait for another review)

@dveeden dveeden mentioned this pull request Oct 27, 2024
10 tasks
@dveeden
Copy link
Collaborator Author

dveeden commented Nov 5, 2024

PTAL @atercattus

@lance6716
Copy link
Collaborator

Seems @atercattus is busy these days, I prefer we wait until Nov. 11 and merge this PR. Then I'll release a new version as other user requested.

@lance6716
Copy link
Collaborator

I'll merge this PR after CI passed. As for release, I want to wait until all active PRs are merged

@lance6716 lance6716 merged commit f230d5f into go-mysql-org:master Nov 11, 2024
13 checks passed
@svaroqui
Copy link

Note that Signal18 maintains a golang open source solution replication-manager for multiple topology on MariaDB and MySQL, battle tested on many use cases https://github.com/signal18/replication-manager/

@dveeden
Copy link
Collaborator Author

dveeden commented Nov 11, 2024

Note that Signal18 maintains a golang open source solution replication-manager for multiple topology on MariaDB and MySQL, battle tested on many use cases https://github.com/signal18/replication-manager/

You may want to send a PR to https://github.com/shlomi-noach/awesome-mysql?tab=readme-ov-file#ha to get this listed there. And maybe consider doing a talk about this at FOSDEM as well.

@atercattus
Copy link
Member

Thanks, @lance6716. I believe you are doing a great job while I am overwhelmed with work :)

If we remove functionality from this project, it is worth adding a link to alternative methods to our documentation.

@svaroqui
Copy link

Note that Signal18 maintains a golang open source solution replication-manager for multiple topology on MariaDB and MySQL, battle tested on many use cases https://github.com/signal18/replication-manager/

You may want to send a PR to https://github.com/shlomi-noach/awesome-mysql?tab=readme-ov-file#ha to get this listed there. And maybe consider doing a talk about this at FOSDEM as well.

Thanks, i'll check if MySQL&Friends is back in FOSDEM this year if not should check with MariaDB for a session in their room hope to see you there and thanks again for go-mysql that we use in many cases in replication-manager like for tracking binlog for PITR

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.

4 participants