fix: keel vip promote --old-primary-gone waits on the old primary 1.5 s at most (keel#108) #121
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/promote-old-primary-gone-bounded"
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?
Fixes #108 (finding B7 of Keel-Linux/handbook#60, again in the 0.23.7 rollout, Keel-Linux/handbook#62).
Problem
keel vip promote --old-primary-gonetook 30.5 s with the old primary dead: three serial waits for the members' channel's 10 s timeout (the epoch, the release, the announcement).Change (after the safety review)
keel/mesh/vipnode.py,bounded,GONE_BOUND); the other peers are not held up. The promote still waits for the lease to go and never revokes it (decision 0049). The ask goes on after the bound, in a thread that is not a daemon, and the promote waits for it before it returns (vipnode.finished), so a slow live old primary still gets the release and the claim.docs/vip.md, the help ofkeel vip promoteandkeel database promote, and the docstring ofcommands.promote_vipsay that, without etcd, an old primary that is alive but cannot be reached stays writable until it learns the newer claim.debian/changelog0.23.8.Tests
tests/mariadb_netns.py: the crash case writes at the VIP from C every 0.1 s (after the replica is connected and semi-synchronous) and reports the write downtime, its parts and the acknowledged rows lost.Measured (
mariadb / trixie, etcd, 250 ms ±25 ms, 2 % loss)Each ask of the dead old primary: 1.5 s (
no answer within 1.5 s, nevertimed out). With etcd the claim waits for the old primary's lease (TTL 20 s, 0049); #122 removes the lag after the VIP lands. 0 acknowledged rows lost.CI record
Green at
44a4c68.vip / trixiefailed once atg_promote_b(etcdctl get: context deadline exceeded, the same failure as main's run 37833124848); I reran that job once (run 37890526886): green. Earlier head 94bae41:mesh / trixiefailed once intest_mesh_channel(TLS EOF), rerun once: green.