[MXS-4798] Broken slave promoted to master when no other servers are available Created: 2023-10-06  Updated: 2023-12-14  Resolved: 2023-11-27

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 6.4.1, 6.4.12, 22.08.10, 23.02.6, 23.08.3
Fix Version/s: 6.4.13, 22.08.11, 23.02.7, 23.08.4

Type: Bug Priority: Major
Reporter: Edward Stoever Assignee: Esa Korhonen
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MXS-4841 Mariadbmon selects diverged server as... Closed
relates to MDEV-32370 Replica should have a way to say it i... Closed
Sprint: MXS-SPRINT-195

 Description   

In a two node setup, if the slave server breaks due to some SQL thread problem (e.g. error 1032 ER_KEY_NOT_FOUND) and then the master goes down, MaxScale will emergency promote the slave so that the cluster stays usable. This is unwanted behavior and often users would prefer that MaxScale simply waits (perhaps for a long time) for the master to come back.

The logic should be changed so that even a broken slave (SQL or IO thread stopped, but not both) prevents new master selection. Only if both are stopped (usually requires "STOP SLAVE"), new master can be selected as this means the dba is modifying the cluster.

A more resilient setup can be assumed to have multiple slaves so that at least one can be properly promoted by failover.


Original description:
Is there a way to configure maxscale to not promote a slave to master if the slave is still applying relay logs (behind master)?
Related Jira issue: MDEV-32370


Generated at Thu Feb 08 04:31:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.