Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
24.02.4
-
MXS-SPRINT-239, MXS-SPRINT-240
Description
Currently, when using MariaDB Monitor, if the primary server in a replication cluster goes down and a failover occurs, and then the old primary comes back online, the old primary auto joins back as replica (assuming that both auto_failover and auto_rejoin are enabled).
Sometimes, the user would prefer that the old primary would return as the primary. This needs to be an optional feature.
The way this will work is that once the old primary rejoins the cluster and replicates properly for some time and does not lag too far behind, the monitor performs an automatic switchover to the old primary.
The monitor needs to keep track of the "failback" server. A manual switchover always sets the new primary as the failback server. Also, manually modifying the replication topology (not recommended) may result in a new failback server being chosen. Automatic switchover due to low disk space and manual reset replication also set the failback primary server.