fix(sync): reap targets not loaded on this replica - #46
Closed
albertovincenzi wants to merge 2 commits into
Closed
Conversation
Reading the inventory from the store is what this branch is for, but the multi-node exemption was read from there too and then applied to the local runtime without checking it. Those are not the same graph. A redeclare registers before it saves. A graph that grew nodes and whose store write then failed is a one-node document in the store and a multi-node graph in this registry, so the merged candidate set offered it up and the reap stopped it and deleted its document. Master could not do this: it iterated runtimes and skipped `rt.plan.nodes.len() > 1`. The runtime now decides, and it is asked BEFORE the store write, so a graph that is exempt keeps its document as well as its consumers. Claude-Session: https://claude.ai/code/session_012K8u7BEJyd6nDNMCQAgH3z
Contributor
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.
Perché
PUT /v1/apps/:app/targetsdichiara l’intera configurazione e deve rimuovere i target omessi. Il reap enumerava però soltantoregistry.of_app(): se la richiesta arrivava a una replica fresca prima del reconcile, il registry era vuoto, il sync rispondevaok: true, ma i target omessi restavano nello store e continuavano a vivere sulle altre repliche.Fix
ok: falsee non rimuove nulla.Verifica
[], lo rimuove dallo store e la prima converge sulla cancellazione;cargo test --workspace;cargo clippy --workspace --all-targets -- -D warnings;cargo fmt --allegit diff --check.Dipendenza / nota per Alice
Questa PR è basata su #29, perché un inventario illeggibile deve sfruttare la sua garanzia “qualsiasi refusal => nessun reap”. Con #28 lo scan completa anche cataloghi paginati; senza #28 resta comunque sicuro e rifiuta il reap quando Queen segnala
truncated.