Repository navigation
TOC-82 Retire nodes, replace rebuilt stores, conflict duplicates - #65
Merged
Merged
Conversation
…OC-82) A retired node's open outages are now withdrawn when the hub starts or reloads with it retired. A new store for a known node replaces the old one: the old store is retired with superseded_at set and its open outages are withdrawn in the same transaction as the new batch. If a replaced store pushes again, or a store resends a differing outage change, the batch rolls back, every store of the node is marked conflicted, and the node's liveness heartbeat goes down with the reason. A conflicted node stays refused across restarts until it is retired. Migration 0022 adds node_store.superseded_at. 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.
Retiring a node, a rebuilt node's new store, and two machines pushing as one node now each end in a defined state (TOC-82, step 8 of
docs/design/federation.md).Behaviour
retiredwithsuperseded_atset, and its open outages are withdrawn (ending = withdrawn; their alerts end as ended by config). The hub logs a warning.conflictedin a separate transaction. That happens when:The push gets a 409. The node's
node:<id>liveness heartbeat is pinged Down with the conflict text, so it alerts straight away with the reason instead of waiting for the node to go stale.retired = true) withdraws the open outages of every store of the node and marks themretired. This happens when the hub starts or reloads with the node retired. Pushes from the node are already refused with 403 before they reach the store. A superseded store of a retired node getsRetired, not a conflict.Changes
node_store.superseded_at. It joins 0020 and 0021 in the next release, and that release needs Christian's fresh yes.docs/api.md,docs/storage.md,docs/design/federation.mdandschema/openapi.json(the 409 description) are updated.tests/cli.rspinned the schema version at 21; it now pins 22.Tests
apply_outages;ended_seq = opened_seq;mark_conflicted;cargo fmt, clippy (plain and withgrpc), andcargo test --workspace.https://claude.ai/code/session_01Ub1Bi7sFncPnpe2Cz4azBE