yiguolei opened a new pull request, #71179: URL: https://github.com/apache/doris/pull/71179
### Background IVF_ON_DISK ANN indexes read vector codes and row IDs from `ann.ivfdata` during searches. These ranges currently use a dedicated cache, while column data uses the storage page cache. ### What problem does this PR solve? Issue Number: None Related PR: #67024 (preserves the direct-read fallback) PR Type: Enhancement Problem Summary: IVF list caching has a separate memory budget and is exempt from dynamic cache capacity adjustment. Route these ranges through the existing data-page cache so ANN and column reads share its budget and eviction policy. Remove the separate cache, configuration and lifecycle code, and migrate the affected test fixtures. After upgrading, IVF list caching follows the storage page cache settings. ### Details - **Change map:** 258 changed production lines: 35 for routing and key namespacing, 223 removing the dedicated cache and its configuration, lifecycle and allocator overloads. 424 changed test lines migrate fixtures, extend shared-cache checks and remove 238 lines of obsolete dedicated-cache tests. No generated files or documentation changes. - **Before and after:** Replace the dedicated LRU with `StoragePageCache` data pages and LRU-K admission. Keep list-sized entries, pinned zero-copy reads, the I/O mutex and double-checked lookup. IVF entries now participate in page-cache capacity adjustment and stale pruning. - **Configs and defaults:** Remove `ann_index_ivf_list_cache_limit` (previously `70%`) and `ann_index_ivf_list_cache_stale_sweep_time_sec` (previously `3600`). Reuse `storage_page_cache_limit` (`20%`), `index_page_cache_percentage` (`10%`), `storage_page_cache_shard_size` (`256`) and `data_page_cache_stale_sweep_time_sec` (`300`). The dynamic `disable_storage_page_cache` switch (default `false`) now also bypasses IVF caching. No new settings. - **Impact on existing users:** SQL, query results and index files retain their formats. ANN and column pages now compete for data-page capacity, so hit rates and I/O can change; no performance benchmark was run. Existing page-cache overrides apply after upgrading. - **Behavior change:** Clearing `DataPageCache` now clears IVF lists. The dedicated `AnnIndexIVFListCache` cache name is removed. - **Migration:** Remove the two obsolete IVF cache settings and tune the existing page-cache budget if needed. Old settings in BE configuration files are ignored with the existing unknown-config warning; they no longer tune IVF caching. Reverting this PR restores the separate cache without changing index files. ### Testing - Local static checks: `build-support/clang-format.sh`, `build-support/check-format.sh`, `build-support/check-build-hygiene.sh` and `git diff --check`. - Updated BE unit tests cover shared data-page accounting, warm hits, eviction and reload, disabled/unavailable cache reads, and concurrent searches. Existing range-read and index-lifetime fixtures now use isolated page caches. These tests are linked into `doris_be_test`; they were not run. - Updated `ann_empty_array_queries` to clear `DataPageCache`; the P0 configuration includes this suite. Existing IVF-on-disk regression results are unchanged. Regression tests were not run. - Compilation, unit tests, regression tests and clang-tidy were not run, per the author's preference to defer builds and tests. ### Notes for Reviewers The `ann.ivfdata` key suffix separates IVF ranges from other page-cache entries. Cache-policy enum values after the removed entry retain their numeric values. The shared test fixture restores both the runner's cache pointer and cache-manager registrations. ### Release note IVF_ON_DISK list data now shares the storage data-page cache. Use storage page cache settings instead of the removed `ann_index_ivf_list_cache_limit` and `ann_index_ivf_list_cache_stale_sweep_time_sec` settings. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: Yes (update the ANN IVF_ON_DISK and BE cache configuration documentation in apache/doris-website to describe the shared budget and removed settings; documentation PR pending). - Pre-submission status: Partially verified: static checks only; compilation, runtime behavior and performance are unverified. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, test changes and this description. - Human review: Not stated. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
