Repository navigation
TOC-111 Page for other nodes' outages once the nodes ahead go down - #68
Merged
Merged
Conversation
…(TOC-111) A node in alert_order decided whether to page for another node's outage only when the push carrying it arrived. An outage pushed while the node ahead was up then went unpaged for good if that node died before it ended. The node now decides again whenever a node ahead goes down: once every node ahead is down and at least one is confirmed so, it opens alerts for the other nodes' outages it holds open and alerted without one, late-marked when the origin detected them long before. A node merely unheard cannot start a takeover alone, so a restart pages for nothing. Taking over is idempotent: an outage with an open alert is skipped inside the write transaction. Claude-Session: https://claude.ai/code/session_01Ub1Bi7sFncPnpe2Cz4azBE Signed-off-by: Christian Jensen <christian@closient.com>
…ed (TOC-111) Claude-Session: https://claude.ai/code/session_01Ub1Bi7sFncPnpe2Cz4azBE Signed-off-by: Christian Jensen <christian@closient.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A node in
[federation] alert_orderused to decide only once, when a push arrived, whether to page for another node's outage. If the node ahead was up at that moment, the outage was recorded with no alert, and nothing paged when that node went down later. Now the node decides again: once every node ahead is down and at least one is confirmed down, it opens alerts for the outages it holds open, alerted and unpaged.Store::take_over(tocsin-store) opens alerts for open, alerted outages from other nodes that have no open alert yet. It skips this node's own outages and synthetic (node:/upstream:) subjects. Running it again does nothing.takeover::take_over_when_ahead_is_down(tocsin) runs one pass at start. It runs again on every confirmed non-up change of a node ahead, after a reload, and after the event bus lags.AlertOrdercombines the alert_order logic thatremote_alertingalready used and the new takeover gate.Unchanged
alerting_client()in serve.rs was pulled out ofstart_withto satisfy clippy's too_many_lines. It does not change behaviour.Tests
node:firstgoes down while it is stopped, and the restarted hub takes over at start with no new push.watches, the takes_over gate, the initial pass.take_overas the initial pass.recordthroughmissand emits the sameCheckChangedas a ping.https://claude.ai/code/session_01Ub1Bi7sFncPnpe2Cz4azBE