Repository navigation
Back the local metastore with an in-memory ByteArrayStore - #413
Merged
Merged
Conversation
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]>
Add ByteArrayHashLabel and ByteArrayIndexedLabel, storage-agnostic twins of the HBase labels backed by an in-memory ByteArrayStore. Every edge kind is encoded in the row key, so a single ordered store reproduces the HBase semantics without table provisioning. ByteArrayLabelSpec drives them without a Graph, covering the hash round-trip, delete, degree counter, and indexed range scan. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the H2-backed local metastore with a single in-memory ByteArrayStore created once in Graph and shared through GraphDefaults.localStore. LocalBackedJdbcHashLabel now overlays a ByteArrayIndexedLabel (local) on top of the JDBC global metastore, and createDatabase no longer provisions a separate local H2 database. InitialSpec verifies the system metadata by decoding hash edges straight from the shared local store; LocalBackedJdbcHashLabelSpec covers the overlay round-trip and the indexName=null scan routing. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
em3s
force-pushed
the
feature/bytearray-labels
branch
from
July 15, 2026 15:43
f8c9297 to
937bcde
Compare
This was referenced Jul 15, 2026
main replaced ByteArrayLabelSpec with the backend-agnostic AbstractLabelCompatibilityTest (#421). After merging main this branch carried both, testing the same four cases twice; remove the stale kotest spec. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
…dundant case Rewrite the kotest StringSpec as a JUnit 5 test and drop the write round-trip case, which duplicates ByteArrayLabelCompatibilityTest. Keep only the indexName=null -> __default__ scan routing, which is unique to LocalBackedJdbcHashLabel. Co-Authored-By: Claude Opus 4.8 <[email protected]>
em3s
marked this pull request as ready for review
July 16, 2026 01:52
Contributor
Author
|
|
The global JdbcHashLabel does not support counting and returns a -1 sentinel row per src. Merging it into count() polluted the result with that sentinel. Count the local store only; the single-src override is dropped in favor of the Label interface default that delegates to the srcSet form. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
Author
|
Merging |
em3s
added a commit
that referenced
this pull request
Jul 16, 2026
Merging main brought in the in-memory ByteArrayStore local metastore (#413), whose ByteArrayIndexedLabel rejects unknown index names. The empty-src scan test still requested created_at_desc, which the old H2 path silently ignored. Route it through indexName=null (__default__), the real scan path for metastore-backed HASH labels. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 task done
Closed
8 of 21 tasks
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
Replace the H2-backed local store inside
LocalBackedJdbcHashLabelwith a single in-memoryByteArrayStore, removing H2 from the production runtime.The store is created once in
Graphand shared throughGraphDefaults.localStore; the local side becomes aByteArrayIndexedLabelwhile the global side stays aJdbcHashLabelon MySQL.createDatabaseno longer provisions a separate local H2 database.Builds on the
ByteArrayStore-backed labels now onmain(#421). Previously the tail of a 3-PR stack; #418 (dead inspector/endpoint removal) and #421 (theByteArrayStorelabels) have since merged, so this now targetsmaindirectly.Changes
LocalBackedJdbcHashLabelnow takes injected labels — local is aByteArrayIndexedLabelover the sharedgraph.localStore, global staysJdbcHashLabel.indexName=nullscans (DdlService.getAll) route to a synthetic__default__prefix-scan index.localMetastorefromGraph/GraphDefaults, addlocalStore, and remove the H2 branch ofcreateDatabase.runtimeOnlydependency: the global metastore still falls back to in-memory H2 when nometastoreUrlis configured, so the server must keep the driver on the runtime classpath.InitialSpecverifies the system metadata by decoding hash edges straight from the shared local store;LocalBackedJdbcHashLabelSpeccovers the overlay round-trip and theindexName=nullscan routing;GraphFixturesis updated to build labels over the shared local store.How to Test
./gradlew buildLocalBackedJdbcHashLabelSpeccovers the local write/read round-trip and__default__scan routing.Started ServerApplicationKtwithbootRun.AI Assistance