Innodb rollback with wsrep reapplies deadlocked statements

Description

Found while investigating

At first it seemed like that similarly to , this issue is caused by incorrect conflict detection, but turns out the reason behind this is changed rollback logic:

PXC retries autocommit deadlocked transactions in sql_parse.cc:7577, but we only reach this code, if we are able to replicate it to another node. If wsrep isn't running, or the other node disconnects, we revert to upstream behavior, which is to report a deadlock and fail.

Environment

None

Smart Checklist

Activity

Show:

Zsolt Parragi November 29, 2021 at 12:15 PM

can't reproduce in 8.0.25.

Zsolt Parragi April 3, 2020 at 8:53 AM

wsrep_retry_autocommit
Description: Number of times autocommited queries will be retried due to cluster-wide conflicts before returning an error to the client. If set to 0, no retries will be attempted, while a value of 1 (the default) or more specifies the number of retries attempted. Can be useful to assist applications using autocommit to avoid deadlocks.

This variable also exists in 5.7, also defaults to 1, but behaves differently there.

Cannot Reproduce

Details

Assignee

Reporter

Labels

Time tracking

2d 2h logged

Affects versions

Priority

Smart Checklist

Created April 2, 2020 at 2:45 PM
Updated March 6, 2024 at 9:39 PM
Resolved November 29, 2021 at 12:16 PM