[MDEV-31596] Client connection loss makes MariaDB commit a non semi-sync ACKed transaction Created: 2023-06-30 Updated: 2023-11-24 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.4.29, 11.2.0 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Luca Pistolesi | Assignee: | Andrei Elkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | replication | ||
| Environment: |
Tested on both Amazon Linux and Docker. |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
While testing the semi-sync replication with just two servers (one Source and a Replica), I noticed this interesting and worrying fact: if a client connection is closed while the Source is waiting for an ACK from a Replica, the transaction is committed regardless the ACK being received. The experiment looks like the following:
The behavior I expected was that the transaction would not get committed and the DB would be stuck until a replica comes online to ACK it. Alternatively, a timeout for a long running query could be triggered kill the transaction. In both cases, I would not expect to see the transaction being committed. Occasionally, when I repeat the experiment three or more time, the DB crashes and I can still see all the transactions being committed after a restart. I searched for a similar problem and I found something close happened in MySQL. Here are the links to the issues I found:
I attached the my.cnf file I used and the container log (in this case is MariaDB-11-latest while I tested also on 10.4.10). |
| Comments |
| Comment by Luca Pistolesi [ 2023-11-14 ] |
|
It has been a while since the creation of the ticket: are there updates? |