Details
-
Bug
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
-
12.1
-
Unexpected results
-
Q3/2025 Maintenance
Description
At present when the primary doesn't receive rpl_semi_sync_master_wait_for_slave_count no. of ACKs the subsequent SQL statements hit the timeout alternately. I mean one statement hits the timeout and the next one doesn't, the next one hits the timeout and the next one doesn't. It's reflected both in the SQL interface execution time as well as in the log.
Repro steps
rpl_topology: 1->2 1->3
Set up semi-sync replication on the primary and on the replicas.
@primary:
MariaDB [(none)]> SHOW STATUS LIKE 'Rpl_semi_sync_master_status';
|
+-----------------------------+-------+
|
| Variable_name | Value |
|
+-----------------------------+-------+
|
| Rpl_semi_sync_master_status | OFF |
|
+-----------------------------+-------+
|
1 row in set (0.001 sec)
|
|
MariaDB [(none)]> SHOW STATUS LIKE 'Rpl_semi_sync_master_clients';
|
+------------------------------+-------+
|
| Variable_name | Value |
|
+------------------------------+-------+
|
| Rpl_semi_sync_master_clients | 2 |
|
+------------------------------+-------+
|
1 row in set (0.001 sec)
|
|
MariaDB [(none)]> SHOW VARIABLES LIKE '%semi%';
|
+-------------------------------------------+--------------+
|
| Variable_name | Value |
|
+-------------------------------------------+--------------+
|
| rpl_semi_sync_master_enabled | ON |
|
| rpl_semi_sync_master_timeout | 3000 |
|
| rpl_semi_sync_master_trace_level | 32 |
|
| rpl_semi_sync_master_wait_for_slave_count | 3 |
|
| rpl_semi_sync_master_wait_no_slave | ON |
|
| rpl_semi_sync_master_wait_point | AFTER_COMMIT |
|
| rpl_semi_sync_slave_delay_master | OFF |
|
| rpl_semi_sync_slave_enabled | OFF |
|
| rpl_semi_sync_slave_kill_conn_timeout | 5 |
|
| rpl_semi_sync_slave_trace_level | 32 |
|
+-------------------------------------------+--------------+
|
10 rows in set (0.001 sec)
|
|
MariaDB [(none)]> USE test;
|
Database changed
|
MariaDB [test]> CREATE TABLE t1 (id INT) ENGINE=Innodb;
|
Query OK, 0 rows affected (0.006 sec)
|
|
MariaDB [test]> SHOW STATUS LIKE 'Rpl_semi_sync_master_status';
|
+-----------------------------+-------+
|
| Variable_name | Value |
|
+-----------------------------+-------+
|
| Rpl_semi_sync_master_status | ON |
|
+-----------------------------+-------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]> INSERT INTO t1 VALUES (1);
|
Query OK, 1 row affected (3.001 sec)
|
|
MariaDB [test]> SHOW STATUS LIKE 'Rpl_semi_sync_master_status';
|
+-----------------------------+-------+
|
| Variable_name | Value |
|
+-----------------------------+-------+
|
| Rpl_semi_sync_master_status | OFF |
|
+-----------------------------+-------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]> INSERT INTO t1 VALUES (2);
|
Query OK, 1 row affected (0.001 sec)
|
|
MariaDB [test]> SHOW STATUS LIKE 'Rpl_semi_sync_master_status';
|
+-----------------------------+-------+
|
| Variable_name | Value |
|
+-----------------------------+-------+
|
| Rpl_semi_sync_master_status | ON |
|
+-----------------------------+-------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]> INSERT INTO t1 VALUES (3);
|
Query OK, 1 row affected (3.001 sec)
|
|
MariaDB [test]> SHOW STATUS LIKE 'Rpl_semi_sync_master_status';
|
+-----------------------------+-------+
|
| Variable_name | Value |
|
+-----------------------------+-------+
|
| Rpl_semi_sync_master_status | OFF |
|
+-----------------------------+-------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]> INSERT INTO t1 VALUES (4);
|
Query OK, 1 row affected (0.001 sec)
|
|
MariaDB [test]> SHOW STATUS LIKE 'Rpl_semi_sync_master_status';
|
+-----------------------------+-------+
|
| Variable_name | Value |
|
+-----------------------------+-------+
|
| Rpl_semi_sync_master_status | ON |
|
+-----------------------------+-------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]>
|
log:
2025-06-30 13:24:20 9 [Note] Semi-sync replication switched ON with slave (server_id: 103) at (binny1.000001, 3273)
|
|
2025-06-30 13:28:15 12 [Warning] Timeout waiting for reply of binlog (file: binny1.000001, pos: 3438), semi-sync up to file binny1.000001, position 1959.
|
2025-06-30 13:28:15 12 [Note] Semi-sync replication switched OFF.
|
|
2025-06-30 13:28:36 9 [Note] Semi-sync replication switched ON with slave (server_id: 102) at (binny1.000001, 3603)
|
2025-06-30 13:28:50 12 [Warning] Timeout waiting for reply of binlog (file: binny1.000001, pos: 3768), semi-sync up to file binny1.000001, position 1959.
|
2025-06-30 13:28:50 12 [Note] Semi-sync replication switched OFF.
|
2025-06-30 13:29:03 9 [Note] Semi-sync replication switched ON with slave (server_id: 102) at (binny1.000001, 3933)
|
Expected behavior
All statements after the timeout should fall back to async until the primary receives rpl_semi_sync_master_wait_for_slave_count no. of ACKs. In other words the status variable Rpl_semi_sync_master_status should remain Off until the primary receives rpl_semi_sync_master_wait_for_slave_count no. of ACKs.
Attachments
Issue Links
- is caused by
-
MDEV-18983 Port rpl_semi_sync_master_wait_for_slave_count from MySQL
-
- Stalled
-
- relates to
-
MDEV-36936 Expose rpl_semi_sync_master_wait_timeouts
-
- Open
-