Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
-
None
Description
The semi-sync protocol between a replica and primary is implemented such that all ACK packets from the replica set a "magic" bit at the start of the packet. The primary's Ack_Receiver thread has a check to ensure that all packets sent from the replica have this bit set (if semi-sync is active), and if not, an error is indicated. When a semi-sync replica stops its connection with the primary (either by STOP SLAVE or in error), it cannot use the API mysql_close() function, because it automatically sends a COM_QUIT command on the connection, which does not conform to the semi-sync protocol. To get around this, the replica will create a new non-semi-sync connection with the primary, and issue a KILL command to outwardly kill the semi-sync connection.
However, if a third party sits in-between this connection as a proxy, and sends a COM_QUIT to sever the connection, the primary will report the error. To accommodate this set-up, the primary's Ack_Receiver thread should allow for an exception to the protocol if the packet is a COM_QUIT command.
Attachments
Issue Links
- relates to
-
MXS-4792 Semi-sync replication through MaxScale causes errors on STOP SLAVE
- Closed
-
MDEV-28141 Slave crashes with Packets out of order when connecting to a shutting down master
- Open
-
MDEV-32551 "Read semi-sync reply magic number error" warnings on master
- Closed