Skip to content

Add ByteArrayStore-backed Hash/Indexed labels (stacked) - #419

Merged
em3s merged 3 commits into
bytearray-cfrom
bytearray-a
Jul 16, 2026
Merged

em3s merged 3 commits into
bytearray-cfrom
bytearray-a

Conversation

@em3s

@em3s em3s commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Add ByteArrayHashLabel and ByteArrayIndexedLabel — storage-agnostic twins of the HBase labels backed by an in-memory ByteArrayStore.

BytesKeyValueEdgeEncoder packs every edge kind into the row key and only writes the default column, so a single ordered ByteArrayStore reproduces HBase read/write/scan semantics and IndexedLabelMixin is reused as-is — no HBase table provisioning needed (unlike the overlay in #390).

Second of a 3-PR stack (stacked on #418):

  1. Remove the dead MetastoreInspector and its dump endpoints #418 — drop the dead inspector/endpoints.
  2. This PR — add the ByteArrayStore-backed labels.
  3. Back the local metastore with an in-memory ByteArrayStore #413 — back the local metastore with them.

Changes

  • Add ByteArrayHashLabel: hash/counter/lock ops over a ByteArrayStore, mirroring HBaseHashLabel on the wire (writes returned as deferred MutationRequests, applied in handleDeferredRequests).
  • Add ByteArrayIndexedLabel: reuses IndexedLabelMixin verbatim for index maintenance and range scans.
  • ByteArrayLabelSpec drives both labels without a Graph, covering the hash round-trip, delete, degree counter, and indexed range scan.

How to Test

  • ./gradlew build
  • ByteArrayLabelSpec instantiates the labels directly on a fresh ByteArrayStore and exercises the standard mutate/read pipeline.

Note: these labels are not wired into anything yet — #413 makes the local metastore use them.

AI Assistance

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

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]>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jul 15, 2026
em3s and others added 2 commits July 16, 2026 09:38
Replace ByteArrayLabelSpec with AbstractLabelCompatibilityTest, a
backend-agnostic JUnit 5 suite covering the hash round-trip, delete,
degree counter, and indexed range scan. ByteArrayLabelCompatibilityTest
and HBaseLabelCompatibilityTest run the same suite against the
ByteArrayStore- and mock-HBase-backed labels, so the twins are held to
identical semantics.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Move the duplicated hash/indexed LabelEntity definitions into
AbstractLabelCompatibilityTest so each backend subclass only wraps them
in its own label, removing the copy that lived in both subclasses.

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

em3s commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Optimistic merge.

@em3s
em3s merged commit 310c5d5 into bytearray-c Jul 16, 2026
1 check passed
@em3s
em3s deleted the bytearray-a branch July 16, 2026 00:46
em3s added a commit that referenced this pull request Jul 16, 2026
* 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]>
@em3s em3s mentioned this pull request Jul 16, 2026
1 task done
@em3s em3s changed the title Add ByteArrayStore-backed Hash/Indexed labels Add ByteArrayStore-backed Hash/Indexed labels (stacked) Jul 16, 2026
@em3s

em3s commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

This has been applied to main in #421.

@em3s em3s self-assigned this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 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