database: a cut MariaDB holder acknowledges a write when the dump thread ends, before the fence (no VIP state at the release, wait_no_slave OFF) #195
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel#195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in rehearsal 2 of the cross-site LNMP test, 2026-10-16: image lnmp 19.0-2 with keel 0.23.38 from the open fix stack (keel#187, #189, #190, #191, #194). Pair 9103 (BR2, primary) and 9102 (BR1), witness 9101 (BR1), etcd 3 voters. Times are Unix seconds (
9466.74means1792149466.74).A network cut of the primary 9103 (nft drops UDP 51820). 0 of 890 acknowledged ids were lost, but only by luck of 1.7 s. Timeline on 9103:
Two problems:
/var/lib/keel/vip/. Sokeel-database-follow.path(PathChanged=/var/lib/keel/vip) does not start follow. The fence of keel#186 came fromkeel-database-watch.timer, 35.3 s after the VIP left. That is later than the semi-synchronous timeout (30 s) from the start of the write.rpl_semi_sync_master_wait_no_slave = OFFreleases the waiting write when the dump thread ends. The dump thread to the cut replica ended 15.1 s after the cut (net.ipv4.tcp_retries2 = 5). With no replica left, MariaDB returned OK for write 200084 at about 9481.85. The row is on 9103 only (an errant GTID). The client did not get the OK only because the VIP had left wg0 1.7 s before and the answer could not reach it. A client on the local socket (PHP on the same node) gets that OK: an acknowledged write that the new primary does not have.So the fix of keel#186 is not enough: the fence must come before the dump thread to a cut replica ends, or a commit must not return OK when the last replica goes. Possible fixes, to decide:
rpl_semi_sync_master_wait_no_slave = ON, so the waiting commit waits for the timeout and not for the dump thread (the replica's own SQL thread then needsrpl_semi_sync_master_enabled = OFFwhile it is a replica, see docs/replication.md).The bridge mirrored this item to GitHub: https://github.com/Keel-Linux/keel/issues/161
Comments, labels and the open or closed state sync both ways.