Josh Kang
e292aa95b3
Allow skipping lmax index and filter block prefetches for external file ingestion
Summary:
Bulk external file ingestion can spend significant commit time prefetching index/filter blocks for large Lmax files. This adds `IngestExternalFileOptions::prefetch_lmax_index_and_filter_blocks` (default true) so bulk-load callers can defer that metadata prefetch when the cache doesn't need immediate warming. The option threads through `FileMetaData::skip_index_and_filter_blocks_prefetch` to drive the existing `LoadTableHandlers()` prefetch logic. Benchmarks show ~40% commit latency reduction (3459 → 2112 μs) and ~55% lower IO time (2560 → 1145 μs) when disabled.
Benchmarks:
```
db_bench --benchmarks=ingestexternalfile --num=2200000 --ingest_external_file_num_batches=1 --ingest_external_file_batch_size=1 --ingest_external_file_use_file_info=true --ingest_external_file_fill_cache=true --cache_index_and_filter_blocks=true --bloom_bits=10 --statistics=true --stats_level=3 --ingest_external_file_prefetch_lmax_index_and_filter_blocks=<true|false>
```
| `ingest_external_file_prefetch_lmax_index_and_filter_blocks` | `rocksdb.ingest.external.file.run.micros` | `rocksdb.table.open.io.micros` | index/filter cache adds | last-level read bytes |
| `true` | `3459 us` | `2560 us` | `1 / 1` | `3551559` |
| `false` | `2112 us` | `1145 us` | `0 / 0` | `1333` |
Reviewed By: xingbowang
Differential Revision: D108678511
fbshipit-source-id: e8951e3aad36cc0accffb33ecc3cc1b4aeb89459
2026-06-16 11:20:07 -07:00
..
2025-01-10 15:32:38 -08:00
2026-02-13 11:18:05 -08:00
2026-02-17 23:33:39 -08:00
2019-04-18 10:55:01 -07:00
2019-04-18 10:55:01 -07:00
2021-03-02 11:42:27 -08:00
2024-10-14 03:01:20 -07:00
2022-10-13 09:00:37 -07:00
2019-04-18 10:55:01 -07:00
2024-02-21 15:45:18 -08:00
2026-02-24 14:10:13 -08:00
2024-10-14 03:01:20 -07:00
2026-06-05 23:09:42 -07:00
2020-05-12 21:07:55 -07:00
2026-02-13 09:18:40 -08:00
2026-06-15 14:45:29 -07:00
2026-06-16 11:20:07 -07:00
2021-09-07 21:19:27 -07:00
2026-05-27 11:53:11 -07:00
2026-06-15 11:14:42 -07:00
2026-02-17 23:33:39 -08:00
2026-02-17 23:33:39 -08:00
2017-08-03 15:56:46 -07:00
2015-05-22 16:03:39 -07:00
2026-06-03 14:03:47 -07:00
2026-06-12 09:42:58 -07:00
2019-04-18 10:55:01 -07:00
2026-02-17 23:33:39 -08:00
2023-01-27 13:14:19 -08:00
2023-01-27 13:14:19 -08:00
2023-01-27 13:14:19 -08:00
2026-06-03 14:03:47 -07:00
2026-02-17 23:33:39 -08:00
2026-06-03 14:03:47 -07:00
2026-02-24 14:10:13 -08:00
2026-06-03 14:03:47 -07:00
2025-09-18 13:27:51 -07:00
2017-08-03 15:56:46 -07:00
2026-02-17 23:33:39 -08:00
2026-05-18 16:24:56 -07:00
2021-03-02 11:42:27 -08:00
2019-04-18 10:55:01 -07:00
2023-07-19 12:05:24 -07:00
2026-05-18 13:35:11 -07:00
2019-04-18 10:55:01 -07:00
2019-04-18 10:55:01 -07:00
2015-06-19 16:24:36 -07:00
2024-12-19 10:58:40 -08:00
2024-12-19 10:58:40 -08:00
2026-06-10 12:58:47 -07:00
2026-06-10 12:58:47 -07:00
2023-01-27 13:14:19 -08:00
2026-02-17 23:33:39 -08:00
2026-02-17 23:33:39 -08:00
2026-04-06 09:05:42 -07:00
2026-04-06 09:05:42 -07:00
2023-01-27 13:14:19 -08:00
2026-05-07 16:40:56 -07:00
2026-03-05 09:41:58 -08:00
2021-03-02 11:42:27 -08:00
2024-10-14 03:01:20 -07:00
2026-02-17 23:33:39 -08:00