Bug #101275 rpl_semi_sync_master_enabled=ON without any connected slaves will cause timeout

Submitted: 22 Oct 2020 13:26 Modified: 23 Oct 2020 7:16
Reporter: lalit Choudhary Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7, 5.7.31, 5.7.32, 8.0.22 OS:Any
Assigned to: CPU Architecture:Any

[22 Oct 2020 13:26] lalit Choudhary
Description:
Setting rpl_semi_sync_master_enabled=ON without any connected slaves will cause the next commit with "Timeout waiting for reply of binlog"message in mysql log.

[Warning] Timeout waiting for reply of binlog (file: mysql-bin.000001, pos: 4503), semi-sync up to file , position 0.

How to repeat:
stop all slave threads on replicas:

ON MASTER
my.cnf

log_bin = mysql-bin.log
server_id = 1

master [localhost] {root} (test) > INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
Query OK, 0 rows affected (0.02 sec)

master [localhost] {root} (test) > show variables like 'rpl_semi_sync_master_enabled';
+------------------------------+-------+
| Variable_name                | Value |
+------------------------------+-------+
| rpl_semi_sync_master_enabled | OFF   |
+------------------------------+-------+
1 row in set (0.01 sec)

master [localhost] {root} (test) > SET GLOBAL rpl_semi_sync_master_enabled='ON';
Query OK, 0 rows affected (0.00 sec)

master [localhost] {root} (test) > create user 'test'@'localhost' IDENTIFIED BY 'testing';
Query OK, 0 rows affected (10.01 sec)

mysql log:

Version: '5.7.31-log'  socket: '/tmp/mysql_sandbox23006.sock'  port: 23006  MySQL Community Server (GPL)
2020-10-22T12:51:42.856150Z 4 [Note] Start binlog_dump to master_thread_id(4) slave_server(101), pos(, 4)
2020-10-22T12:51:43.177206Z 5 [Note] Start binlog_dump to master_thread_id(5) slave_server(102), pos(, 4)
2020-10-22T13:09:42.866761Z 4 [Note] Stop asynchronous binlog_dump to slave (server_id: 101)
2020-10-22T13:09:42.866915Z 4 [Note] Aborted connection 4 to db: 'unconnected' user: 'rsandbox' host: 'localhost' (failed on flush_net())
2020-10-22T13:09:43.190184Z 5 [Note] Stop asynchronous binlog_dump to slave (server_id: 102)
2020-10-22T13:09:43.190364Z 5 [Note] Aborted connection 5 to db: 'unconnected' user: 'rsandbox' host: 'localhost' (failed on flush_net())
2020-10-22T13:09:59.444288Z 6 [Note] Semi-sync replication initialized for transactions.
2020-10-22T13:09:59.444384Z 6 [Note] Semi-sync replication enabled on the master.
2020-10-22T13:09:59.444662Z 0 [Note] Starting ack receiver thread
2020-10-22T13:10:20.388814Z 6 [Warning] Timeout waiting for reply of binlog (file: mysql-bin.000001, pos: 4503), semi-sync up to file , position 0.
2020-10-22T13:10:20.388845Z 6 [Note] Semi-sync replication switched OFF.
[23 Oct 2020 7:16] MySQL Verification Team
Hello Lalit,

Thank you for the report and feedback!

Thanks,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.061 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.