fix: keel database promote makes the database writable before it joins the late asks (keel#169) #171
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!171
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pg-promote-follow-before-join-169"
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 #169. Stacked on #170 (keel#165): merge #170 first.
On a real pair with etcd,
keel database promote --old-primary-gonemade the database writable 11.9 s and 12.9 s after the VIP moved (bound 5 s, keel#148).Where the 12 s went
keel vip promotebounds each ask of the gone old primary to 1.5 s (keel#108), but it joins the late asks before it returns (vipnode.finished). A dead node costs the members' channel's 10 s connect timeout.keel database promoteobserved and followed only after that join: the VIP at 2927.87, out of recovery at 2939.45, about 10 s plus 1.5 s. CI did not see it, because the harness follows the VIP's state by itself, askeel-database-follow.pathdoes, and that path had failed on the real nodes (keel#164).Change
vippromote.promotetakesthen, a step that runs once the promote succeeded, before the join.keel database promotepasses its database step there. The promote still joins the asks before it exits.Tests
RED first, in
tests/test_mesh_vipetcd.py: the database step runs within 2 s while the ask of the old primary takes 3 s, and the promote returns after the ask; a refused promote runs no database step.34190e4fa6b4a593d1bdb4a593d1bd61e30f9b7661e30f9b76bec6e3ccc4