Skip to content

Route HBase HASH labels through the V3 tableBinding path - #296

Merged
em3s merged 1 commit into
mainfrom
fix/hash-label-v3-table-binding
Apr 30, 2026
Merged

em3s merged 1 commit into
mainfrom
fix/hash-label-v3-table-binding

Conversation

@em3s

@em3s em3s commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

To keep the V3 surface uniform during the V2→V3 transition, HASH-type HBase labels are now exposed as an HBaseIndexedLabel shape so they reach the V3 tableBinding path without per-label-type branching in V2BackedEngine. A small adapter, HBaseHashOnlyIndexedLabel, plays this role: empty indices/caches, with scan and cache explicitly blocked.

Closes #

Changes

  • Add HBaseHashOnlyIndexedLabel (HASH-only adapter on top of HBaseIndexedLabel). scan and cache throw an explicit "not supported on HASH-type label" error so callers get a clear signal instead of an "Index/Cache not found" fall-through.
  • LabelEntity.materialize: HASH + HBaseStorage now materializes via HBaseHashOnlyIndexedLabel.create.
  • Drop two V2 HBase hash-prefix scan tests in LabelSpec that exercised a path no longer used in production (- hbase variants only); JDBC and - hbase indexed variants are kept.
  • AliasSpec: switch fixture from hbaseHash to jdbcHash so the alias-mechanism coverage stays intact (JDBC HASH still supports hash-prefix scan).

How to Test

  • ./gradlew :engine:test

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (Opus 4.7)

V3 endpoints on HASH-type labels were returning HTTP 400 because
V2BackedEngine.getTableBinding only accepts HBaseIndexedLabel. HASH +
HBaseStorage now materializes to a new HBaseHashOnlyIndexedLabel
(IndexedLabel shape with empty indices/caches), so the V3 path works for
read/get/count/write. scan and cache are explicitly blocked on this
label with a clear "not supported on HASH-type label" error.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Apr 30, 2026
@em3s
em3s merged commit bbca253 into main Apr 30, 2026
3 checks passed
@em3s
em3s deleted the fix/hash-label-v3-table-binding branch April 30, 2026 03:05
em3s added a commit that referenced this pull request Apr 30, 2026
@em3s em3s self-assigned this May 14, 2026
em3s added a commit that referenced this pull request Jul 24, 2026
A HASH label on datastore storage materialized to DatastoreHashLabel, which
extends HBaseHashLabel directly and therefore sits outside the HBaseIndexedLabel
family that V2BackedEngine.getTableBinding requires. Every edge mutation on such
a table failed on the V3 path with "not indexed or not supported for edge
mutation". HBase HASH labels already avoid this via HBaseHashOnlyIndexedLabel
(PR #296); datastore was never given the equivalent wrapper.

Add DatastoreHashOnlyIndexedLabel, the datastore mirror of
HBaseHashOnlyIndexedLabel: an HBaseIndexedLabel with no indices whose scan/cache
throw UnsupportedOperationException. With no indices the indexed mutation path
writes only the base hash rows, so the on-disk format is identical to a plain
hash label and existing tables need no data migration. Route the
HASH + DatastoreStorage branch to it and drop the now-unused DatastoreHashLabel.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant