Repository navigation
Expose what references a datastore table - #478
Merged
Merged
Conversation
1 task done
em3s
force-pushed
the
fix/guard-datastore-table-references
branch
from
August 6, 2026 08:43
d596e55 to
4897a7c
Compare
em3s
force-pushed
the
feat/datastore-table-references-api
branch
from
August 6, 2026 08:45
2eb61fd to
a3b339f
Compare
em3s
force-pushed
the
fix/guard-datastore-table-references
branch
2 times, most recently
from
August 6, 2026 08:56
d264d3b to
0fbae0f
Compare
em3s
force-pushed
the
feat/datastore-table-references-api
branch
from
August 6, 2026 08:58
a3b339f to
0cf9251
Compare
em3s
force-pushed
the
fix/guard-datastore-table-references
branch
from
August 6, 2026 09:05
0fbae0f to
4fae82e
Compare
em3s
force-pushed
the
feat/datastore-table-references-api
branch
from
August 6, 2026 09:05
0cf9251 to
7ec9edb
Compare
em3s
force-pushed
the
feat/datastore-table-references-api
branch
2 times, most recently
from
August 6, 2026 09:16
61ad0f7 to
3f74539
Compare
Deciding whether an HBase table is safe to tear down means reconstructing the
`alias -> label -> storage -> table` chain client-side, from the metadata listings, across every
tenant. The server already resolves that chain to guard its own disable and drop, so let clients
ask instead of rebuild.
`GET .../tables/{tableName}/references` answers for one table. That costs the same metadata scan as
the whole cluster does, so `GET /graph/v3/datastore/hbase/references` returns every binding from a
single scan, keyed by `namespace:tableName`, narrowed by an optional `namespace` parameter. It sits
outside `tables/` to avoid colliding with `tables/{tableName}`.
Inactive bindings are included so an operator can tell a teardown in progress from a table nothing
ever pointed at.
em3s
force-pushed
the
feat/datastore-table-references-api
branch
from
August 6, 2026 09:17
3f74539 to
4991539
Compare
Contributor
Author
|
Optimistic |
1 task done
This was referenced Aug 6, 2026
em3s
added a commit
that referenced
this pull request
Aug 6, 2026
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
added a commit
that referenced
this pull request
Aug 7, 2026
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
added a commit
that referenced
this pull request
Aug 7, 2026
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]>
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
Deciding whether an HBase table is safe to tear down means reconstructing the
alias -> label -> storage -> tablechain client-side. The server already resolves that chain to guard its own disable and drop, so let clients ask instead.Stacked on #477. Relates to #370
Changes
GET .../tables/{tableName}/referencesfor one tableGET /graph/v3/datastore/hbase/referencesfor the whole cluster from a single scan, keyed bynamespace:tableNamePer-table resolution costs a metadata scan per database, so anything walking a cluster should use the bulk form. It sits outside
tables/to avoid colliding withtables/{tableName}. Inactive bindings are included so an operator can tell a teardown in progress from a table nothing ever pointed at.How to Test
AI Assistance