Skip to content

[ISSUE-796] Clean up PartitionType TODOs in rocksdb store module - #823

Open
yyyCode wants to merge 1 commit into
apache:masterfrom
yyyCode:fix/issue-796-partition-type-todo
Open

[ISSUE-796] Clean up PartitionType TODOs in rocksdb store module#823
yyyCode wants to merge 1 commit into
apache:masterfrom
yyyCode:fix/issue-796-partition-type-todo

Conversation

@yyyCode

@yyyCode yyyCode commented Aug 2, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

Closes #796.

Cleans up two stale TODOs on the PartitionType enum in the rocksdb graph store (geaflow-store-rocksdb):

  • DT// TODO: Support dt partition: DT partition is already implemented via SyncGraphDtPartitionProxy and dispatched by ProxyBuilder, so this TODO is obsolete and is removed.
  • DT_LABEL// TODO: Support label dt partition: this combination has no proxy implementation. Previously, configuring partition.type=dt_label fell through to a generic "unexpected partition type" error. ProxyBuilder.build now rejects DT_LABEL explicitly with a message that names the unsupported type (fail-fast), and the TODO is replaced with a NOTE documenting the gap for future implementers.

No behavior change for the supported partition types (NONE, LABEL, DT).

How was this PR tested?

  • Tests have Added for the changes
  • Production environment verified

Added PartitionTypeTest covering:

  • case-insensitive enum lookup and rejection of unknown types;
  • the partition flags of DT / DT_LABEL / NONE;
  • ProxyBuilder rejecting DT_LABEL with an explicit message that names the type;
  • ProxyBuilder still dispatching DT to a real proxy.

The test targets ProxyBuilder directly, so it does not require opening a native RocksDB instance. mvn test -Dtest=PartitionTypeTest passes (5/5) and mvn checkstyle:check reports 0 violations on the module.

The `PartitionType` enum in the rocksdb store carried two stale `TODO`s:

- `// TODO: Support dt partition` on `DT` — DT partition is already
  implemented (`SyncGraphDtPartitionProxy`, dispatched by `ProxyBuilder`),
  so the TODO is removed.
- `// TODO: Support label dt partition` on `DT_LABEL` — this combination
  has no proxy implementation. Configuring it previously fell through to a
  generic "unexpected partition type" error. `ProxyBuilder.build` now
  rejects `DT_LABEL` explicitly with a message that names the unsupported
  type, and the TODO is replaced with a NOTE documenting the gap.

Adds `PartitionTypeTest` covering the enum lookup/flags, the explicit
`DT_LABEL` rejection, and that `DT` is still dispatched to a real proxy.
The test targets `ProxyBuilder` directly so it does not depend on opening
a native RocksDB instance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up a small TODO in the store module

1 participant