Repository navigation
Answer what is left to clean up across the fleet - #483
Merged
Merged
Conversation
em3s
force-pushed
the
feat/control-cleanup-projection
branch
from
August 6, 2026 14:34
a0e8c20 to
fef44b9
Compare
1 task done
em3s
force-pushed
the
feat/control-cleanup-projection
branch
from
August 7, 2026 01:23
fef44b9 to
8df7531
Compare
A cleanup client has to know, per table, what each side holds and what still binds to it. Every client derives that itself today, and two of the facts are ones no single cluster can supply. Sides are symmetric here: a table's state is one entry per side, so a table that survives only on the standby is an absent active side rather than a second kind of row. Clients model that as a separate list because they see one cluster at a time; the control plane does not have to. The chain comes from the references endpoint added in #478 rather than being reconstructed, and each reference carries the side it was found on - a label still active on the standby is exactly the thing that blocks a teardown halfway through. Two tenants configured against the same cluster resolve to the same cluster key, which is how a table held by another tenant is noticed without anyone declaring it. That answer names the tenant, because "blocked" without "by whom" leaves the operator where they started. A side that failed is reported as failed. An empty table list from a cluster that never answered would read as nothing left to clean up, which is the one wrong answer this endpoint must never give. Part of #370 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
em3s
force-pushed
the
feat/control-cleanup-projection
branch
from
August 7, 2026 01:26
8df7531 to
ceee811
Compare
Contributor
Author
|
Optimistic |
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.
Summary
A cleanup client needs to know, per datastore table, what each side holds and what still binds to it. Every client derives that itself today — and two of the facts involved are ones no single cluster can supply.
GET /control/htablesanswers it once for the whole fleet.Sides are symmetric. A table's state is one entry per side, so a table that survives only on the standby is an absent active side rather than a second kind of row. Clients model that as a separate list because they see one cluster at a time; the control plane does not have to.
The chain is read, not reconstructed. References come from the endpoint added in #478, and each one carries the side it was found on — a label still active on the standby is exactly the thing that blocks a teardown halfway through.
Sharing is noticed without anyone declaring it. Two tenants configured against the same cluster resolve to the same cluster key (
host:port), so a table held by another tenant shows up assharedWith— and it names the tenant, because "blocked" without "by whom" leaves the operator where they started.A failed side is reported as failed. An empty table list from a cluster that never answered would read as nothing left to clean up, which is the one wrong answer this endpoint must never give.
Changes
CleanupProjection(pure) andCleanupServiceunderserver/control/cleanupGET /control/htableswith optionaltenantandenvfiltersTopology.cluster(tenant, side)— the cluster key that makes sharing visibleEnv.ofaccepts the spelling config uses:env: prodin yaml and?env=prodin a url should not disagree, and an unknown value names the ones that existCallerHeadersso both control endpoints forward the caller's identity the same wayHow to Test
CleanupProjectionTestdrives the projection from fixtures — standby-only tables, a table held from another tenant, references carrying their side, and a failed side not reading as a clean fleet.ControlCleanupE2ETestpoints every configured cluster at a closed port, so the all-sides-failed path is exercised over http.AI Assistance