Bug #99370 | Semi-synchronous replication executes un-acknowledged transactions | ||
---|---|---|---|
Submitted: | 27 Apr 2020 15:12 | Modified: | 19 May 2020 16:40 |
Reporter: | Erol Guven (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
Version: | 5.7.29 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Apr 2020 15:12]
Erol Guven
[5 May 2020 11:40]
MySQL Verification Team
Hi Erol, This is expected behavior, a limitation that applies to the whole concept of semi-sync. It is not properly documented so I'll convert this into documentation bug so our doc team can improve on the details in the documentation. When using semi-sync, the correct way to recover after a master failure without losing losslessness is to *discard* the master and fail over to the most up-to-date slave. This is consistent because transactions for which the master did not receive an ACK have neither been acknowledged to the committing client nor externalized to other clients, so we simply lose them. all best Bogdan p.s. You might want to switch to group replication where this problem does not exist
[19 May 2020 16:40]
Margaret Fisher
Posted by developer: Thanks for raising this issue. I've added a note to https://dev.mysql.com/doc/refman/8.0/en/replication-semisync.html and earlier release versions: Important: With semisynchronous replication, if the master crashes and a failover to a slave is carried out, the failed master should not be reused as the replication master, and should be discarded. It could have transactions that were not acknowledged by any slave, which were therefore not committed before the failover. If your goal is to implement a fault-tolerant replication topology where all the servers receive the same transactions in the same order, and a server that crashes can rejoin the group and be brought up to date automatically, you can use Group Replication to achieve this.