Details
-
Bug
-
Status: Approved (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11.18, 11.4.12
-
Can result in hang or crash
-
Q3/2026 Replic. Development
Description
Full message:
2026-06-28 15:12:19 0 [ERROR] Found 2 prepared transactions! It means that server was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start server with --tc-heuristic-recover switch to commit or rollback pending transactions.
Discovered when testing the fix for MDEV-38147:
On the joiner, the wsrep XID continuity check (handler.cc:wsrep_order_and_check_continuity()) recovers a contiguous run of prepared wsrep XIDs starting at the SE checkpoint and stops at the first gap, potentially leaving some prepared transactions uncommitted.
The post-recovery dry-run ha_recover(0) (mysqld.cc:init_server_conponents()) then finds those leftover prepared transactions and aborts.
The non-contiguous prepared set in the mariabackup snapshot is almost certainly the the consequence of wsrep_slave_threads>0: parallel appliers preparing out of order.
and the per-transaction rotation at 4096 makes the snapshot land mid-gap. It only affects the joiner.
log_bin=ON seems to be essential for reproduction
Attachments
Issue Links
- blocks
-
MDEV-38147 Mariadb error 1950 after SST
-
- Stalled
-