Bug #98076 semi-synchronous replication when stop slave and master package error

Submitted: 26 Dec 2019 7:06 Modified: 13 Feb 2020 0:38
Reporter: Lehman Michael Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.25 OS:Any (7.6)
Assigned to: CPU Architecture:Any

[26 Dec 2019 7:06] Lehman Michael
Description:
I built the replication architecture as follows:
A<->B
use semi-replication.

master A:
+-------------------------------------------+------------+
| Variable_name                             | Value      |
+-------------------------------------------+------------+
| rpl_semi_sync_master_enabled              | ON         |
| rpl_semi_sync_master_timeout              | 1000       |
| rpl_semi_sync_master_trace_level          | 32         |
| rpl_semi_sync_master_wait_for_slave_count | 1          |
| rpl_semi_sync_master_wait_no_slave        | ON         |
| rpl_semi_sync_master_wait_point           | AFTER_SYNC |
| rpl_semi_sync_slave_enabled               | ON         |
| rpl_semi_sync_slave_trace_level           | 32         |
+-------------------------------------------+------------+

master B:
-------------------------------------------+------------+
| Variable_name                             | Value      |
+-------------------------------------------+------------+
| rpl_semi_sync_master_enabled              | ON         |
| rpl_semi_sync_master_timeout              | 1000       |
| rpl_semi_sync_master_trace_level          | 32         |
| rpl_semi_sync_master_wait_for_slave_count | 1          |
| rpl_semi_sync_master_wait_no_slave        | ON         |
| rpl_semi_sync_master_wait_point           | AFTER_SYNC |
| rpl_semi_sync_slave_enabled               | ON         |
| rpl_semi_sync_slave_trace_level           | 32         |
+-------------------------------------------+------------+

When I execute stop slave on A:

root@localhost:(none) 5.7.22-log 02:47:10> stop slave;
Query OK, 0 rows affected, 1 warning (0.00 sec)

Error log output on A:

2019-12-26T14:34:06.697490+08:00 33 [Note] Error reading relay log event for channel '': slave SQL thread was killed
2019-12-26T14:34:06.699904+08:00 32 [Note] Slave I/O thread killed while reading event for channel ''
2019-12-26T14:34:06.699967+08:00 32 [Note] Slave I/O thread exiting for channel '', read up to log 'mysql-bin.000002', position 2500

Error log output on B:

2019-12-26T14:34:06.699936+08:00 0 [ERROR] /usr/local/mysql/bin/mysqld: Got an error reading communication packets
2019-12-26T14:34:39.670314+08:00 8 [Note] Stop semi-sync binlog_dump to slave (server_id: 2102453317)
2019-12-26T14:34:39.670621+08:00 8 [Note] Aborted connection 8 to db: 'unconnected' user: 'repl' host: '192.168.210.245' (failed on flush_net())

When I stop semi-synchronous replication,there is no "Got an error reading communication packets" log.Only the following information:
root@localhost:(none) 5.7.22-log 02:56:31> set global rpl_semi_sync_slave_enabled=off;
Query OK, 0 rows affected (0.00 sec)

2019-12-26T14:57:56.903323+08:00 10 [Note] Stop asynchronous binlog_dump to slave (server_id: 2102453317)
2019-12-26T14:57:56.903580+08:00 10 [Note] Aborted connection 10 to db: 'unconnected' user: 'repl' host: '192.168.210.245' (failed on flush_net())

Is this normal?

How to repeat:
see description
[13 Feb 2020 0:38] MySQL Verification Team
Hi,

Thanks for your report. Verified as described.

all best
Bogdan

p.s. I did not manage to reproduce this in first try.

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

Page generated in 0.050 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.