XiaoHongbo-Hope opened a new pull request, #995:
URL: https://github.com/apache/paimon-rust/pull/995

   ## Purpose
   
   Global-index predicates such as an OR of precise AND branches can issue 
multiple equality lookups against the same BTree file. The reader already 
reuses the footer and index block, but each lookup reads its data block again.
   
   This PR adds a scan-scoped data-block cache so lookups that resolve to the 
same block reuse its decoded contents without changing predicate or 
residual-filter semantics.
   
   ## Changes
   
   - Cache decoded BTree data blocks by file path, offset, and size.
   - Bound the cache by decoded bytes with LRU eviction.
   - Honor Java's `btree-index.cache-size` option and 128 MiB default; `0` 
disables the cache.
   - Share the cache across BTree readers within one global-index scan.
   - Keep standalone `BTreeIndexReader::open` behavior unchanged.
   
   The cache is scoped to one scan and storage context. It does not add an 
unbounded global cache or share mutable reader state. Concurrent cold misses 
are unchanged.
   
   ## Verification
   
   A counting `FileRead` test performs three equality lookups whose keys are in 
one data block:
   
   | Configuration | Data-block reads |
   | --- | ---: |
   | Cache disabled | 3 |
   | Cache enabled | 1 |
   
   The test also verifies the exact row IDs. Additional tests cover file 
isolation, disabling the cache, and byte-budget eviction.
   
   - `cargo test -p paimon --lib btree::tests` (40 passed, 1 ignored)
   - `cargo test -p paimon --lib table::global_index_scanner::tests` (58 
passed, 1 ignored)
   - `cargo test -p paimon --lib 
spec::core_options::tests::test_btree_index_cache_size_matches_java_default_and_validates_values`
   - `cargo clippy -p paimon --lib -- -D warnings`
   - `cargo fmt --all -- --check`
   - `git diff --check`
   
   This PR does not claim production OSS request or end-to-end workload 
results; those require environment-specific validation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to