Skip to content

feat: add vector search timing and I/O diagnostics - #711

Merged
jerry-024 merged 8 commits into
apache:mainfrom
jerry-024:feat/vector-search-timing
Aug 17, 2026
Merged

feat: add vector search timing and I/O diagnostics#711
jerry-024 merged 8 commits into
apache:mainfrom
jerry-024:feat/vector-search-timing

Conversation

@jerry-024

@jerry-024 jerry-024 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Add opt-in timing and I/O diagnostics for locating latency, concurrency waits, and read amplification in vector search. Logs are emitted through the log crate only when PAIMON_LOG_VECTOR_SEARCH_TIMING=1 and the paimon::vector_search target is enabled at debug level.

Changes

  • Report API and evaluation timings for snapshot and manifest loading, global-index search, refinement, raw fallback, result merging, and finalization.
  • Report vindex reader lifecycle timings, native search wall time, batch chunking, scalar fallbacks, concurrency, and memory budget for both batch and single-query entry points.
  • Track logical ranges, requested bytes, physical reads, returned bytes, read-ahead hits, caller I/O wait, and internal range-read permit wait across cloned vindex readers.
  • Report full-file read time and byte counts for the Lumina backend and the no-runtime vindex fallback.
  • Stabilize the existing disk-cache CRC restart test by constructing its corrupted fixture directly (e6f3b35; unrelated test-only cleanup).

Testing

  • cargo +1.97.0 fmt --all -- --check
  • cargo +1.97.0 clippy -p paimon --lib -- -D warnings
  • cargo +1.97.0 test -p paimon --lib (2302 passed, 1 ignored)
  • Range-reader timing/concurrency tests and scalar vindex search regression test
  • git diff --check

Notes

  • No public API or storage-format changes.
  • Timing fields that aggregate concurrent work use *_sum_ms names and may exceed wall-clock totals.

@jerry-024
jerry-024 marked this pull request as draft August 14, 2026 06:08
@jerry-024 jerry-024 changed the title feat: add vector search timing logs feat: add opt-in vector search timing diagnostics Aug 14, 2026
…timing

* upstream/main:
  fix(vindex): avoid full index reads during refine (apache#708)
  feat(vindex): build indexes from streamed data splits (apache#707)
  feat: support deletion vector merge-on-read (apache#706)

# Conflicts:
#	crates/paimon/src/table/vector_search_builder.rs
#	crates/paimon/src/vindex/mod.rs
* main:
  perf(vindex): size native batches by active indexes (apache#709)
  fix(data-evolution): require row tracking and row IDs (apache#718)
  feat(go): add table write bindings (apache#658)
  fix(scan): preserve Data Evolution file order in row-id groups (apache#717)
  fix(file_index): align file index format with Java V1 (apache#719)
  fix: configure OpenDAL writer chunk size (apache#713)
  fix(python): release GIL during catalog I/O (apache#716)
  feat(write): add fixed-bucket write primitives for postpone tables (apache#659)
  feat: rust examples for creating and querying Paimon tables (apache#648)
  fix(table): reject row ranges for format tables at read construction (apache#700)
  perf(arrow): prune IN predicates with row-group stats (apache#705)
  feat(io): support in-memory local cache (apache#710)
  fix(dlf): refresh expiring credentials (apache#714)
  fix(datafusion): normalize index_type in global index procedures (apache#715)
  fix(auth): fail closed on query-auth tables outside the read boundary (apache#691)

# Conflicts:
#	crates/paimon/src/table/vector_search_builder.rs
#	crates/paimon/src/vindex/reader.rs
@jerry-024
jerry-024 marked this pull request as ready for review August 17, 2026 03:28
)
self.timing_enabled,
)?;
self.batch_stats = batch_stats;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: search_batch() stores the collected stats on the reader, but only visit_batch_vector_search() consumes them and emits paimon_vindex_reader. The PK-vector scorer calls load_validated() + search_batch() directly (vector_search_builder.rs:923-935), so with timing enabled that route collects batch/range-I/O diagnostics but returns without publishing them.

Could we make telemetry reporting independent of the convenience wrapper (for example, return/commit the stats from the search API or pass an explicit diagnostics reporter), and add coverage for the PK/hybrid route?

@jerry-024 jerry-024 changed the title feat: add opt-in vector search timing diagnostics feat: add vector search timing and I/O diagnostics Aug 17, 2026
@shyjsarah

Copy link
Copy Markdown
Contributor

+1

@shyjsarah shyjsarah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@LsomeYeah LsomeYeah left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@jerry-024
jerry-024 merged commit ab90d01 into apache:main Aug 17, 2026
13 checks passed
@jerry-024
jerry-024 deleted the feat/vector-search-timing branch August 17, 2026 07:02
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.

3 participants