Skip to content

feat(file_index): generate indexes for append writes - #819

Open
QuakeWang wants to merge 2 commits into
apache:mainfrom
QuakeWang:append-file-index
Open

feat(file_index): generate indexes for append writes#819
QuakeWang wants to merge 2 commits into
apache:mainfrom
QuakeWang:append-file-index

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Closes #818.

Rust can read FileIndexes, but ordinary append writes leave index metadata empty. This change generates configured indexes during append writes so committed files can benefit from FileIndex pruning.

Brief change log

  • Validate top-level Bitmap/Bloom Filter configuration and build indexes per physical file, including rolling files.
  • Store complete indexes embedded or as sidecars using the configured threshold (default 500 B), and clean up failed writes.

Tests

  • Cover commit/reload, actual pruning, Bloom false positives, NULLs, rolling, threshold boundaries, failure cleanup and commit abort.
  • Formatting, workspace Clippy and core tests with fulltext,vortex passed (2968 passed, 2 ignored).

API and Format

No public API or index format changes. Reuses existing FileIndex serialization and metadata; generation is limited to ordinary append writes.

Documentation

Added append FileIndex configuration and scope to the getting-started guide.

Build configured Bitmap and Bloom Filter indexes per append data file and
record embedded or sidecar indexes in commit metadata. Clean up failed
indexed writes and verify pruning through committed table reads.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Comment thread crates/paimon/src/table/table_write.rs Outdated
row_kind_generator: Option<RowKindGenerator>,
row_kind_filter: Option<RowKindFilter>,
file_index_options: Option<Arc<FileIndexOptions>>,
indexed_write_failed: bool,

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.

Why need this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was an unnecessary defensive check to prevent writer reuse after a failure. Removed in 2fa63e3; error propagation and file cleanup are preserved.

Remove index-specific failure flags and reuse guards while retaining error
propagation and cleanup of newly created files. Update the cleanup test
and documentation to reflect this behavior.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.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.

Support FileIndex generation for append writes

2 participants