Skip to content
Draft

test #66377

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d7f715c
[feature](be) Add asynchronous file cache writes
bobhan1 Jul 15, 2026
0c2e680
[refactor](be) Simplify asynchronous cache read planning
bobhan1 Jul 16, 2026
2281dde
[improvement](be) Avoid cache probe on full inflight hit
bobhan1 Jul 16, 2026
74163c0
[refactor](be) Decouple async cache writes from global config
bobhan1 Jul 16, 2026
d0c8884
[improvement](be) Increase async file cache write concurrency
bobhan1 Jul 16, 2026
9c0d5cf
[test](be) Complete async file cache write unit coverage
bobhan1 Jul 16, 2026
d54752e
[refactor](be) Align file cache probe results with read blocks
bobhan1 Jul 16, 2026
1e7b645
[test](be) Add dynamic async write backpressure coverage
bobhan1 Jul 17, 2026
1b181f1
[refactor](be) Group async file cache write configs
bobhan1 Jul 17, 2026
5f8f42c
[test](be) Strengthen async write MPMC pressure coverage
bobhan1 Jul 17, 2026
28d431b
[improvement](be) Add async file cache write observability
bobhan1 Jul 17, 2026
45879c9
[test](be) Add async file cache write microbenchmark
bobhan1 Jul 17, 2026
098fc86
[test](be) Repeat and document async cache write benchmark
bobhan1 Jul 17, 2026
376b20c
[fix](be) Handle preallocated cache blocks at file tail
bobhan1 Jul 20, 2026
6603645
[fix](be) Preserve downloader ownership across read-only cache probes
bobhan1 Jul 20, 2026
c5d9425
[fix](be) Treat incompatible cache blocks as async probe misses
bobhan1 Jul 21, 2026
ea932e1
[fix](be) Align file cache writer allocations to block boundaries
bobhan1 Jul 21, 2026
e8baa95
[fix](be) Stop changing segment cache blocks to index
bobhan1 Jul 22, 2026
5930100
[feature](be) Add drop-oldest async cache write admission
bobhan1 Jul 28, 2026
3ec1e5d
[improvement](be) Default async cache writes to drop oldest
bobhan1 Jul 28, 2026
7d13763
[improvement](be) Always drop oldest queued async cache write
bobhan1 Jul 29, 2026
b329ef0
[improvement](be) Bound async cache writes by memory
bobhan1 Jul 31, 2026
f4a819f
[improvement](be) Simplify async cache write admission
bobhan1 Jul 31, 2026
1630ecb
[improvement](be) Add switch to bypass S3 writer file cache
bobhan1 Jul 21, 2026
c62160b
[chore](build) Remove unrelated build and microbenchmark doc changes
bobhan1 Aug 3, 2026
c495ff8
[refactor](be) Simplify async cache write queue state
bobhan1 Aug 3, 2026
719ca02
[refactor](be) Encapsulate async cache write workers
bobhan1 Aug 3, 2026
a4faf4d
[fix](be) Preserve runtime config update semantics
bobhan1 Aug 3, 2026
e776d5d
[doc](be) Clarify async cache write byte accounting
bobhan1 Aug 3, 2026
38357af
[improvement](be) Track inflight write buffer bytes
bobhan1 Aug 3, 2026
b586dd1
[improvement](be) Support automatic async write pending limit
bobhan1 Aug 3, 2026
70585ac
change conf fo test
bobhan1 Aug 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ endif()
option(BUILD_FILE_CACHE_MICROBENCH_TOOL "Build file cache mirobench Tool" OFF)
if (BUILD_FILE_CACHE_MICROBENCH_TOOL)
add_subdirectory(${SRC_DIR}/io/tools)
add_subdirectory(${SRC_DIR}/io/cache/benchmark)
install(FILES
${BASE_DIR}/../bin/start_file_cache_microbench.sh
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
Expand Down
20 changes: 20 additions & 0 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,11 @@ DEFINE_Validator(variant_storage_parse_mode,

// block file cache
DEFINE_Bool(enable_file_cache, "false");
// ATTENTION: For test only. Keep this enabled in production.
// Whether S3 storage write paths populate file cache while writing data to object storage.
// Disable this for tests that need load and compaction output to bypass file cache while keeping
// query-side file cache writes enabled.
DEFINE_mBool(enable_file_cache_write_from_s3_file_writer, "true");
// format: [{"path":"/path/to/file_cache","total_size":21474836480,"query_limit":10737418240}]
// format: [{"path":"/path/to/file_cache","total_size":21474836480,"query_limit":10737418240},{"path":"/path/to/file_cache2","total_size":21474836480,"query_limit":10737418240}]
// format: {"path": "/path/to/file_cache", "total_size":53687091200, "ttl_percent":50, "normal_percent":40, "disposable_percent":5, "index_percent":5}
Expand Down Expand Up @@ -1283,6 +1288,21 @@ DEFINE_mBool(file_cache_enable_only_warm_up_idx, "false");
DEFINE_Int32(file_cache_downloader_thread_num_min, "32");
DEFINE_Int32(file_cache_downloader_thread_num_max, "32");

// async file cache write
DEFINE_mBool(enable_async_file_cache_write, "false");
DEFINE_mInt32(async_file_cache_write_workers_per_disk, "16");
// A positive value is the absolute limit for one cache disk. -1 selects the automatic limit:
// max(512 MiB, 1% of the BE memory limit).
DEFINE_mInt64(async_file_cache_write_max_pending_bytes_per_disk, "536870912"); // 512 MiB
DEFINE_mBool(enable_async_file_cache_write_inflight_write_buffer_index, "true");
DEFINE_Int32(async_file_cache_write_inflight_write_buffer_index_shard_count, "64");
DEFINE_Validator(async_file_cache_write_workers_per_disk,
[](int32_t value) { return value > 0 && value <= 128; });
DEFINE_Validator(async_file_cache_write_max_pending_bytes_per_disk,
[](int64_t value) { return value == -1 || value > 0; });
DEFINE_Validator(async_file_cache_write_inflight_write_buffer_index_shard_count,
[](int32_t value) { return value > 0; });

DEFINE_mInt32(index_cache_entry_stay_time_after_lookup_s, "1800");
DEFINE_mInt32(inverted_index_cache_stale_sweep_time_sec, "600");
DEFINE_mBool(enable_write_index_searcher_cache, "false");
Expand Down
8 changes: 8 additions & 0 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ DECLARE_Int32(blocking_pipeline_executor_size);

// block file cache
DECLARE_Bool(enable_file_cache);
DECLARE_mBool(enable_file_cache_write_from_s3_file_writer);
// format: [{"path":"/path/to/file_cache","total_size":21474836480,"query_limit":10737418240}]
// format: [{"path":"/path/to/file_cache","total_size":21474836480,"query_limit":10737418240},{"path":"/path/to/file_cache2","total_size":21474836480,"query_limit":10737418240}]
// format: [{"path":"/path/to/file_cache","total_size":21474836480,"query_limit":10737418240, "ttl_percent":50, "normal_percent":40, "disposable_percent":5, "index_percent":5}]
Expand Down Expand Up @@ -1320,6 +1321,13 @@ DECLARE_mBool(enable_evaluate_shadow_queue_diff);

DECLARE_mBool(file_cache_enable_only_warm_up_idx);

// async file cache write
DECLARE_mBool(enable_async_file_cache_write);
DECLARE_mInt32(async_file_cache_write_workers_per_disk);
DECLARE_mInt64(async_file_cache_write_max_pending_bytes_per_disk);
DECLARE_mBool(enable_async_file_cache_write_inflight_write_buffer_index);
DECLARE_Int32(async_file_cache_write_inflight_write_buffer_index_shard_count);

// inverted index searcher cache
// cache entry stay time after lookup
DECLARE_mInt32(index_cache_entry_stay_time_after_lookup_s);
Expand Down
9 changes: 8 additions & 1 deletion be/src/exec/scan/olap_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ static bool has_file_cache_statistics(const io::FileCacheStatistics& stats) {
stats.write_cache_io_timer != 0 || stats.bytes_write_into_cache != 0 ||
stats.num_skip_cache_io_total != 0 || stats.read_cache_file_directly_timer != 0 ||
stats.cache_get_or_set_timer != 0 || stats.lock_wait_timer != 0 ||
stats.get_timer != 0 || stats.set_timer != 0 ||
stats.get_timer != 0 || stats.set_timer != 0 || stats.async_cache_write_submitted != 0 ||
stats.async_cache_write_rejected != 0 ||
stats.async_cache_write_buffer_alloc_fail != 0 ||
stats.async_cache_write_drop_stale_epoch != 0 ||
stats.inflight_write_buffer_index_hit != 0 ||
stats.inflight_write_buffer_index_miss != 0 || stats.probe_downloaded_hit != 0 ||
stats.probe_downloading_hit != 0 || stats.probe_miss != 0 ||
stats.block_wait_success != 0 || stats.block_wait_timeout != 0 ||
stats.inverted_index_num_local_io_total != 0 ||
stats.inverted_index_num_remote_io_total != 0 ||
stats.inverted_index_num_peer_io_total != 0 ||
Expand Down
2 changes: 2 additions & 0 deletions be/src/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ if(ENABLE_TDE)
endif()

list(REMOVE_ITEM IO_FILES "${CMAKE_CURRENT_SOURCE_DIR}/fs/benchmark/fs_benchmark_tool.cpp")
list(REMOVE_ITEM IO_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/cache/benchmark/async_file_cache_write_microbench.cpp")

add_library(IO STATIC ${IO_FILES})

Expand Down
Loading
Loading