perf(vindex): read search indexes through positional ranges - #645
Merged
Conversation
This was referenced Aug 1, 2026
JunRuiLee
force-pushed
the
perf/vindex-range-read
branch
4 times, most recently
from
August 1, 2026 07:44
e2d4574 to
de9cdcc
Compare
JunRuiLee
marked this pull request as ready for review
August 1, 2026 08:12
JunRuiLee
force-pushed
the
perf/vindex-range-read
branch
from
August 1, 2026 09:00
de9cdcc to
f86649d
Compare
JunRuiLee
marked this pull request as draft
August 1, 2026 09:01
JunRuiLee
marked this pull request as ready for review
August 1, 2026 09:31
JunRuiLee
force-pushed
the
perf/vindex-range-read
branch
from
August 1, 2026 12:16
f86649d to
9b31e1e
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
This is PR 1/3 of a stacked vector-search performance series.
The regular/global-index vindex path currently buffers the complete index file
before search. For large indexes, a single query usually needs only metadata and
a subset of posting lists, so the full read adds unnecessary I/O and peak memory.
This change adds a safe positional-read foundation and switches the single-query
regular/global-index vindex path to it.
Scope boundary
this PR; perf(vindex): execute compatible queries through native batch search #646 replaces that fallback with native batch range reads.
perf(vector-search): execute PK-vector leaves concurrently #647.
Brief change log
SeekReadadapter backed by Paimon's asynchronousFileRead.second runtime.
UnexpectedErrorinstead of panicking when range-backed vindex search isdriven outside a Tokio runtime.
block_in_placeand host blocking-pool deadlocks.global-index.thread-numas the per-query file fan-out while separatingthat logical limit from the process executor's physical OS-thread cap.
max(32, 4 * available_parallelism)and reclaimgrowth workers after one idle minute, while retaining the CPU-sized baseline.
global-index.thread-num = 1.semaphore across cloned readers.
try_clone_readerand read capabilities through the type-erased vindexinput adapter; the range reader deliberately reports storage-agnostic defaults
because it accepts arbitrary range counts and the optimal window is backend-specific.
runtime when an already-started search is cancelled.
Tests
cargo test -p paimon vindex --lib— 118 passedcargo test -p paimon test_global_index_thread_num --lib— 2 passedcargo test -p paimon --test pk_vector_baseline_test— 8 passedcargo test -p paimon --test pk_vector_batch_test— 10 passedcargo test -p paimon --test pk_vector_java_fixture_test— 1 passedpython3 scripts/dependencies.py verifypython3 scripts/release_licenses.py --check— 21 generated legal files validatedcargo fmt --all -- --checkgit diff --checkCoverage includes caller-runtime polling, a non-Tokio error path, current-thread runtimes, clone support,
short reads, bounded coalescing, physical worker clamping, idle worker reclamation,
and local filesystem reads when the host blocking pool has only one thread.
API and Format
No public API or storage-format changes.
Documentation
The existing
global-index.thread-numAPI documentation now includes regularvector global-index search. No user-facing storage or query API changes are required.