Skip to content

Remove the dead MetastoreInspector and its dump endpoints - #418

Merged
em3s merged 5 commits into
mainfrom
bytearray-c
Jul 16, 2026
Merged

em3s merged 5 commits into
mainfrom
bytearray-c

Conversation

@em3s

@em3s em3s commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove MetastoreInspector and MetastoreController, which only powered the debug /graph/v2/metastore/{global,local} dump endpoints. Nothing else consumes them.

First of a 3-PR stack that reworks the local metastore backend:

  1. This PR — drop the dead inspector/endpoints.
  2. #TBD_A — add ByteArrayStore-backed Hash/Indexed labels.
  3. Back the local metastore with an in-memory ByteArrayStore #413 — back the local metastore with the in-memory ByteArrayStore.

Changes

  • Delete MetastoreInspector and MetastoreController.
  • Drop the metastoreInspector / localMetastoreInspector beans in GraphConfiguration and the Graph.metastoreInspector property.
  • Remove the /graph/v2/metastore/{global,local} entries from the read-only endpoint allowlist test.
  • Drop the now-obsolete dumpMetastore assertion from InitialSpec.

How to Test

  • ./gradlew build
  • ReadOnlyRequestFilterTest still passes its endpoint-exhaustiveness check with the two entries removed.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Opus 4.8

MetastoreInspector and MetastoreController only powered the debug
/graph/v2/metastore/{global,local} dump endpoints, which are unused.
Drop them along with the two inspector beans and the Graph property.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. maintenance Maintenance work. labels Jul 15, 2026
em3s and others added 2 commits July 16, 2026 10:02
* Add ByteArrayStore-backed Hash/Indexed labels (#419)

* style: apply spotless formatting

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
# Conflicts:
#	engine/src/test/kotlin/com/kakao/actionbase/v2/engine/label/AbstractLabelCompatibilityTest.kt
@em3s

em3s commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

This PR removes the following endpoints:

  • GET /graph/v2/metastore/global
  • GET /graph/v2/metastore/local

These are not user-facing endpoints, and will not be used once the metastore is consolidated into datastore.

@em3s

em3s commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Merging

@em3s
em3s merged commit 6650ce4 into main Jul 16, 2026
2 checks passed
@em3s
em3s deleted the bytearray-c branch July 16, 2026 01:23
@em3s em3s self-assigned this Jul 16, 2026
em3s added a commit that referenced this pull request Aug 11, 2026
#418 removed `MetastoreInspector` and its dump endpoints as dead code, which they
were - nothing called them. Something does now. `jdbc-metastore remaining` (#487)
measures how much room each metadata scan window has left, and this is the only
view of the rows such a scan actually reads.

It has to be the rows on disk, not the entities. A metadata `DELETE` rewrites its
row with `Active.INACTIVE` rather than removing it, and `JdbcHashLabel.scanStorage`
applies its `LIMIT` before anything filters on active, so a scan key crowded with
tombstones truncates while `DdlService.getAll` drops the `hasNext` that would have
said so. Every read path hides exactly what needs measuring. This is scaffolding
for the move to EdgeIndex and goes when the JDBC metastore does.

Named for that store rather than for the idea of a metastore:
`JdbcMetastoreInspector`, `JdbcMetastoreController`, `JdbcMetastoreRow`. Only the
JDBC one has scan windows that fill with tombstones, and a name that claimed the
general concept would have to be repurposed or quietly keep meaning the old thing.

Narrower than what was removed. No `prefix` filter: it built `k LIKE '<prefix>%'`
with no escaping, and the keys are base64url, an alphabet containing `_`, a
single-character LIKE wildcard, so roughly a third of prefixes matched rows from
other windows. No `sort`, because `id ASC` is the only order worth serving - it is
the primary key, so paging walks an index that already exists. No `/local`, which
has no backing store on `main` any more. The response carries `id`, `k` and four
decoded fields; the encoded value, property map, timestamp, direction and type are
dropped, and `v` is the largest column of the lot.

The request shape stays compatible with 0.4.x, which still serves the old
endpoint, so one client reads both. Blocking JDBC work goes to `boundedElastic`,
which the removed version did not do.

Tested against a running server as well as in unit tests: create a service, delete
it, and the row is still there with `active: false`, which is the whole premise.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
em3s added a commit that referenced this pull request Aug 11, 2026
#418 removed `MetastoreInspector` and its dump endpoints as dead code, which they
were. Something calls them now: `jdbc-metastore remaining` (#487) measures how much
room each metadata scan window has left, and this is the only view of the rows such
a scan actually reads. A `DELETE` rewrites its row with `Active.INACTIVE` instead
of removing it, and `scanStorage` applies its `LIMIT` before anything filters on
active, so every path above this one hides exactly what needs measuring.

Scaffolding for the move to EdgeIndex, so it is named for the store it reads -
`JdbcMetastoreInspector`, not a name claiming the general concept - and goes when
that store does.

Narrower than what was removed. No `prefix`: it built `k LIKE '<prefix>%'`
unescaped over base64url keys, whose `_` is a LIKE wildcard. No `sort`: `id ASC` is
the primary key, so paging walks an index that already exists. No `/local`: no
backing store for it on `main`. The row is `id`, `k` and four decoded fields.

The request shape still matches 0.4.x, so one client reads both. Blocking JDBC work
goes to `boundedElastic`, which the removed version did not do.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
em3s added a commit that referenced this pull request Aug 11, 2026
#418 removed `MetastoreInspector` and its dump endpoints as dead code, which they
were. Something calls them now: `jdbc-metastore remaining` (#487) measures how much
room each metadata scan window has left, and this is the only view of the rows such
a scan actually reads. A `DELETE` rewrites its row with `Active.INACTIVE` instead
of removing it, and `scanStorage` applies its `LIMIT` before anything filters on
active, so every path above this one hides exactly what needs measuring.

Scaffolding for the move to EdgeIndex, so it is named for the store it reads -
`JdbcMetastoreInspector`, not a name claiming the general concept - and goes when
that store does.

Narrower than what was removed. No `prefix`: it built `k LIKE '<prefix>%'`
unescaped over base64url keys, whose `_` is a LIKE wildcard. No `sort`: `id ASC` is
the primary key, so paging walks an index that already exists. No `/local`: no
backing store for it on `main`. The row is `id`, `k` and four decoded fields.

The request shape still matches 0.4.x, so one client reads both. Blocking JDBC work
goes to `boundedElastic`, which the removed version did not do.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance work. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant