Repository navigation
[kv] Support global secondary indexes - #4820
Open
platinumhamburg wants to merge 1 commit into
Open
platinumhamburg wants to merge 1 commit into
platinumhamburg wants to merge 1 commit into
Conversation
platinumhamburg
marked this pull request as ready for review
October 23, 2026 08:43
platinumhamburg
force-pushed
the
index-preview
branch
from
October 23, 2026 08:51
a330838 to
1ad09b1
Compare
platinumhamburg
force-pushed
the
index-preview
branch
from
October 23, 2026 23:18
1ad09b1 to
89b5574
Compare
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.
Purpose
Linked issue: close #4813
Implement global secondary indexes for primary-key tables as described in FIP-38, allowing Java clients and Flink lookup joins to find current rows by non-primary-key equality predicates.
Brief change log
PutIndexRPC.Tests
Passed local checks:
Clean build of all 48 selected Maven modules, including test compilation, Checkstyle, and Spotless:
mvn clean install -DskipTests -pl '!fluss-lake/fluss-lake-lance,!fluss-dist'.47 common metadata/schema/encoding tests and 5 RPC API-key tests.
205 server tests covering index replication, ordering, source/target failover, remote WAL recovery, WAL gaps, snapshot serialization, KV lookups, metadata, and validation.
92 client tests covering secondary-index table lifecycle, partition deletion/recreation, lookup, authorization, and writer accumulation.
11 Flink conversion tests and 15 local secondary-index lookup-join cases across Flink 1.18, 1.19, 1.20, 2.2, and 2.3, including synchronous/asynchronous lookup.
The full unit-test run encountered five
DiskWriteLockedExceptionerrors inReplicaFetcherThreadTest: this host reports 95.55% disk usage against the fixture's default 85% write limit. A diagnostic rerun with the fixture's write-limit ratio set to 1.0 passed all 8 tests. The submitted fixture retains its original configuration.The feature and E2E results listed above were obtained locally. No remote E2E pipeline was triggered.
API and Format
Schema, secondary-index lookup to the Java table API, andsecondary-index.<name>.*Flink table options.PutIndexv0 (API key 1075), optional index replay offsets in KV snapshot metadata, and partition tombstone metadata.PutIndexAPI key 1068 are not wire-compatible with this implementation.Documentation
Add a secondary-index user guide covering table creation, Java lookups, Flink lookup joins, visibility guarantees, lifecycle, recovery, and limitations. Link it from the primary-key table and Java API guides, add a Flink join example, and document all index replication options and the client continuation thread setting. The design follows FIP-38.