[MDEV-32945] Rpl_semi_sync_master_status is ON Without Any Connected Slaves Created: 2023-12-04  Updated: 2023-12-06

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.6
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Brandon Nesterenko Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: MDEV-32551-test

Issue Links:
Problem/Incident
is caused by MDEV-32551 "Read semi-sync reply magic number er... Closed

 Description   

If a master has no connected slaves it will report its status as ON. which is inconsistent with the timeout behavior, as a transaction which has a semi-sync wait timeout will turn the status to OFF.

It seems more logical that the semi-sync status should be OFF if there are no slaves to synchronize with.



 Comments   
Comment by Michael Widenius [ 2023-12-06 ]

MariaDB [test]> show status like "rpl_semi_sync_master_status";
----------------------------------+

Variable_name Value

----------------------------------+

Rpl_semi_sync_master_status OFF

----------------------------------+

I also tried this diff:
++ b/mysql-test/suite/rpl/t/rpl_log_pos.test
@@ -9,7 +9,10 @@

  1. Passes with rbr no problem, removed statement include [jbm]

+show status like "rpl_semi_sync_master_status";
+
source include/master-slave.inc;
+show status like "rpl_semi_sync_master_status";

------------------

With this result:
+++ /home/my/maria-10.6/mysql-test/suite/rpl/r/rpl_log_pos.reject 2023-12-06 16:00:38.129647143 +0200
@@ -1,5 +1,11 @@
+show status like "rpl_semi_sync_master_status";
+Variable_name Value
+Rpl_semi_sync_master_status OFF
include/master-slave.inc
[connection master]
+show status like "rpl_semi_sync_master_status";
+Variable_name Value
+Rpl_semi_sync_master_status OFF

However if if I first do:
ariaDB [test]> set global rpl_semi_sync_master_enabled = ON;
MariaDB [test]> show status like "rpl_semi_sync_master_status";
----------------------------------+

Variable_name Value

----------------------------------+

Rpl_semi_sync_master_status ON

----------------------------------+
MariaDB [test]> create or replace table t1(a int) engine=innodb;
MariaDB [test]> insert into t1 values (1);
MariaDB [test]> commit;
MariaDB [test]> show status like "rpl_semi_sync_master_status";
----------------------------------+

Variable_name Value

----------------------------------+

Rpl_semi_sync_master_status ON

----------------------------------+

Comment by Brandon Nesterenko [ 2023-12-06 ]

monty my filing is about the second case, where if you first run

set global rpl_semi_sync_master_enabled = ON;

then rpl_semi_sync_master_status is still ON, even with no connected slaves (as you show).

Generated at Thu Feb 08 10:35:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.