Set cluster_mysql_servers_sync_algorithm=3 (auto_select) on all nodes

The default value (1) syncs both configured AND runtime mysql_servers,
including changes made by the monitor (read_only checks moving servers
between writer/reader hostgroups). This caused circular sync: a
cluster node's monitor modified servers, creating a newer epoch, and
the primary synced this back — overwriting its correct config and
saving the corrupted version to disk.

With auto_select (3), the algorithm chooses mysql_servers_v2 when
the monitor is enabled, which only syncs user-configured changes
and ignores monitor-triggered runtime modifications.

Evidence: node 6042's monitor removed MariaDB servers from hostgroup
1701 ("Setting status OFFLINE HARD"), creating checksum 0x7C0A67D5
with epoch 1774288555. Primary (epoch 1774288549) synced from node
6042 and saved to disk, losing hostgroup 1300 permanently.

Fixes #5540.
v3.0-ci260323
Rene Cannao 1 month ago
parent fb9ff4476e
commit 3c4ebf0da7

@ -184,6 +184,7 @@ if [ "${NUM_NODES}" -gt 0 ]; then
SET admin-admin_credentials="admin:admin;radmin:radmin;cluster1:secret1pass";
SET admin-cluster_username="cluster1";
SET admin-cluster_password="secret1pass";
SET admin-cluster_mysql_servers_sync_algorithm=3;
SET admin-restapi_enabled='true';
SET admin-debug='true';
UPDATE global_variables SET variable_value='false' WHERE variable_name='admin-hash_passwords';
@ -202,6 +203,7 @@ SQL
${MYSQL_CMD} -P${ADMIN_PORT} <<SQL
UPDATE global_variables SET variable_value='false' WHERE variable_name='admin-hash_passwords';
SET admin-cluster_mysql_servers_sync_algorithm=3;
SET admin-restapi_port=${RESTAPI_PORT};
SET admin-restapi_enabled='true';
SET admin-debug='true';

Loading…
Cancel
Save