Skip to content

[feature](cloud) Support file cache write index only - #64995

Merged
gavinchou merged 2 commits into
apache:masterfrom
bobhan1:doris-write-idx-only
Jul 1, 2026
Merged

[feature](cloud) Support file cache write index only#64995
gavinchou merged 2 commits into
apache:masterfrom
bobhan1:doris-write-idx-only

Conversation

@bobhan1

@bobhan1 bobhan1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary:

Purpose

This PR adds a new BE config, enable_file_cache_write_index_file_only, to make cloud rowset writes and compaction outputs write only index-related content into file cache. This avoids actively putting segment data into file cache during write, reducing cache pollution from large data pages.

The main target scenario is a limited local cache where query performance should prioritize indexes and segment metadata. With this mode enabled, the write path protects inverted index files and segment index/footer ranges, while normal data pages are still loaded and cached by the query read path when needed.

High-Level Changes

  • Add BE config enable_file_cache_write_index_file_only, default false.
  • Make rowset/segment file-cache write decisions file-type aware:
    • SEGMENT_FILE does not create a full-file cache builder and does not allow adaptive write in index-only mode.
    • INVERTED_INDEX_FILE is still written into file cache through the direct write path.
    • segment index/footer ranges are preloaded into file cache by SegmentIndexFileCacheLoader after segment close.
  • Update packed file handling to honor the original file type when deciding whether to write file cache.
  • Add profile statistics for segment footer/index reads and separate them from data-page and inverted-index reads.
  • Replace correlated boolean parameters in CachedRemoteFileReader::_update_stats with a read-type enum:
    • data page
    • inverted index
    • segment footer/index
  • Add BE UTs and cloud regressions for both normal file and packed file paths.

Behavior

When enable_file_cache_write_index_file_only=true:

  • Segment data is not actively written into file cache during write, flush, or compaction output.
  • Segment index/footer ranges are synchronously preloaded into file cache after segment close.
  • Independent inverted index files are written into file cache through the direct write path.
  • Query-side data-page reads keep the existing behavior. The query read path may still fill cache according to current rules.
  • Segment open, footer/index access, and inverted index access can hit the index-related content preloaded by the write path.
  • Query profile exposes separate cache/remote read statistics for data pages, inverted indexes, and segment footer/index reads.

Interaction With Existing Configs

The write-side file-cache behavior is decided in this order:

  1. enable_file_cache=false is the highest-priority global switch.

    • All file-cache writes are disabled.
    • This includes independent inverted index direct cache and segment index/footer preload.
  2. enable_file_cache=true and enable_file_cache_write_index_file_only=true enables global forced index-only mode.

    • Segment data does not create a full-file cache builder.
    • Segment data cannot be written by adaptive write.
    • Segment index/footer ranges are written into file cache by SegmentIndexFileCacheLoader after segment close.
    • Independent inverted index files are written through the INVERTED_INDEX_FILE direct write path.
    • This config has higher priority than enable_file_cache_write_base_compaction_index_only and enable_file_cache_write_cumu_compaction_index_only.
    • These index writes do not depend on enable_file_cache_adaptive_write, compaction keep configs, hit-ratio thresholds, or request/session write_file_cache.
  3. enable_file_cache=true, enable_file_cache_write_index_file_only=false, and a compaction-level index-only config is enabled applies index-only behavior only to the matching compaction output.

    • enable_file_cache_write_base_compaction_index_only=true only forces base compaction output to use index-only file-cache writes.
    • enable_file_cache_write_cumu_compaction_index_only=true only forces cumulative compaction output to use index-only file-cache writes.
    • These two configs do not affect load, normal flush, schema change output, or query read-path cache fill.
    • Compaction types not matched by these configs continue to use existing write_file_cache, adaptive write, compaction keep, and hit-ratio decisions.
  4. enable_file_cache=true and all three index-only configs are false preserves existing behavior.

    • write_file_cache, enable_file_cache_adaptive_write, compaction keep configs, schema-change hit ratios, and existing rowset/file-writer decisions continue to control whether cache is written.

With enable_file_cache_adaptive_write

  • When index-only is disabled, enable_file_cache_adaptive_write=true keeps the existing adaptive write behavior. Segment data may be written into file cache if the cache-space check passes.
  • When index-only is enabled, adaptive write no longer participates in segment data decisions.
  • Even if enable_file_cache_adaptive_write=true, segment data is still not written into file cache, while segment index/footer and independent inverted index files are still written.

With Compaction Output Keep Configs

Related configs include:

  • enable_file_cache_keep_base_compaction_output
  • file_cache_keep_base_compaction_output_min_hit_ratio
  • compaction output hit-ratio checks

When index-only is disabled, existing compaction output cache behavior is preserved.

When index-only is enabled, compaction output is forced into index-only behavior:

  • Compaction output segment data is not actively written into file cache.
  • Segment index/footer ranges are synchronously written into file cache.
  • Independent inverted index files are direct-cached.
  • Compaction keep configs and hit-ratio thresholds no longer decide whether index content is written into file cache.

With Base/Cumulative Compaction Index-Only Configs

Related configs include:

  • enable_file_cache_write_base_compaction_index_only
  • enable_file_cache_write_cumu_compaction_index_only

These two configs are narrower compaction-output policies and only take effect when enable_file_cache_write_index_file_only=false.

  • When enable_file_cache_write_base_compaction_index_only=true, base compaction output uses index-only behavior: output segment data is not actively cached, while output segment index/footer ranges and independent inverted index files are written into file cache.
  • When enable_file_cache_write_cumu_compaction_index_only=true, cumulative compaction output uses index-only behavior: output segment data is not actively cached, while output segment index/footer ranges and independent inverted index files are written into file cache.
  • If only one of the two configs is enabled, the other compaction type keeps the existing cache-write decision flow.
  • If enable_file_cache_write_index_file_only=true, the global index-only config takes precedence and the base/cumulative compaction-specific configs no longer change the final behavior.
  • enable_file_cache=false is still the highest-priority switch and disables all of these file-cache writes.

With Schema Change Output Thresholds

  • When index-only is disabled, file_cache_keep_schema_change_output_min_hit_ratio keeps its existing semantics.
  • When index-only is enabled, schema change output also follows index-only behavior:
    • segment data is not actively written into file cache;
    • index-related content is written into file cache;
    • schema-change hit-ratio thresholds no longer decide whether index content is cached.

With disable_file_cache / Request write_file_cache

  • enable_file_cache=false disables everything and has the highest priority.
  • When index-only is enabled, the BE config has higher priority than request/session write_file_cache=false.
  • Even if session disable_file_cache=true makes request-side write_file_cache=false, as long as BE enable_file_cache=true and index-only is enabled:
    • index-related content is still written into file cache;
    • segment data is still not written into file cache.
  • When index-only is disabled, disable_file_cache=true preserves existing behavior and load output does not actively write file cache.

With Packed File

  • When index-only is disabled, packed small files keep the existing whole-file cache behavior.
  • When index-only is enabled:
    • packed small segment files must not be whole-file cached, preventing segment data from entering file cache;
    • segment index/footer ranges are written into file cache by SegmentIndexFileCacheLoader;
    • packed independent index small files are independent index files and can be whole-file cached.

With enable_flush_file_cache_async

  • Segment index/footer ranges are written through synchronous dry-run reads and do not depend on write-path enable_flush_file_cache_async.
  • Independent inverted index files still use the direct write path, so they continue to follow existing async flush behavior.

With index_percent in file_cache_path

SegmentIndexFileCacheLoader marks index-related reads as index data so that they go to the FileCacheType::INDEX queue when possible.

After enabling index-only mode, index_percent should be reviewed based on index size. The default index_percent=5 may be insufficient for large indexes.

Behavior Matrix

Scenario index-only=false index-only=true
load segment data follows existing cache policy not actively cached
load segment index/footer depends on existing whole-file cache or read path synchronously range-read into file cache after segment close
load independent inverted index file follows existing cache policy direct-cached by write path
cumulative compaction segment data may be cached by existing behavior not actively cached
cumulative compaction segment index/footer may be cached by existing behavior synchronously range-read into file cache after segment close
base compaction force-keep output whole output rowset may be cached only output segment index/footer is preloaded
adaptive write has enough space segment data may be cached segment data is still not cached
packed small index file may be cached can be whole-file cached
packed small segment file may be cached not whole-file cached; internal index/footer is preloaded
query read fill cache unchanged unchanged
event-driven warm-up unchanged unchanged

Release note

Add BE config enable_file_cache_write_index_file_only to support index-only file-cache writes for cloud rowset writes and compaction outputs.

Check List (For Author)

  • Test

    • Regression test
      • env -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy -u ALL_PROXY -u all_proxy ./run-regression-test.sh --run -d regression-test/suites/cloud_p0/cache/write_index_only -g docker -runMode=cloud -dockerSuiteParallel 1
      • Result: Test 3 suites, failed 0 suites, fatal 0 scripts, skipped 0 scripts
    • Unit Test
      • ./run-be-ut.sh --run --filter=CloudFileCacheWriteIndexOnlyConfigTest.*:CloudFileCacheWriteIndexOnlyTest.*:CompactionFileCacheTest.*:CloudCompactionTest.should_cache_compaction_output -j100
      • Result: PASSED 35 tests
    • Manual test (add detailed scripts or steps below)
      • build-support/clang-format.sh
      • build-support/check-format.sh
      • ./build.sh --be --fe --cloud -j100
      • ../load_docker_conf.sh
      • docker build -f docker/runtime/doris-compose/Dockerfile -t bh-cluster-2 .
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes. When enable_file_cache_write_index_file_only=true, write-side cloud file-cache behavior becomes index-only: segment data is not actively written into file cache, while segment index/footer ranges and independent inverted index files are written into file cache. The config defaults to false, so existing behavior is preserved by default.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…file cache write index only (apache#9450)

pick selectdb/selectdb-core#9096
- Cherry-pick `a37184e9f097e789c4f4e0b40725a98fc49f2851` from
`tag-selectdb-cloud-26.0.3-minimax`.
- Support file cache write index-only behavior and related segment
index/footer preload plumbing.
- Adapt conflicts for this branch local writer, packed file, and
vertical compaction interfaces.

- Preserved this branch existing index writer interface instead of
importing source-branch-only `IndexFileWriterPtr` /
`create_index_file_writer` plumbing.
- Preserved packed-file behavior and added branch-local
`PackedAppendContext::write_file_cache` compatibility with legacy
default behavior.
- Adapted the new vertical compaction test to this branch 4-argument
`RowsetWriter::add_columns` API.
- Did not introduce `enable_file_cache_write_cumu_compaction_index_only`
or `enable_file_cache_write_base_compaction_index_only`, because this
branch did not originally have those configs.

- `git diff HEAD^ HEAD --check`
- `rg -n
"\\bIndexFileWriterPtr\\b|has_ann_index|create_index_file_writer|enable_file_cache_write_(base|cumu)_compaction_index_only|compaction_output_write_index_only|should_enable_compaction_cache_index_only"
be/src be/test regression-test docker/runtime/doris-compose/command.py
-S`
- `./run-be-ut.sh --run
--filter=CloudFileCacheWriteIndexOnlyConfigTest.* -j120`
- `./run-be-ut.sh --run --filter=CloudFileCacheWriteIndexOnly* -j120`
- `./build.sh --be --fe --cloud -j120`
- Rebuilt `foundationdb/foundationdb:7.1.26-single-layer` from remote
registry layers to avoid the local containerd overlay mount failure.
Verified the imported image has one rootfs layer.
- Rebuilt `bh-cluster-2` with cloud FE enterprise guard jar present in
`output/fe/lib/fe-enterprise.jar`, so FE can load
`org.apache.doris.cluster.ClusterGuard` in cloud docker mode.
- `env -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy -u
ALL_PROXY -u all_proxy
DORIS_FDB_IMAGE=foundationdb/foundationdb:7.1.26-single-layer
./run-regression-test.sh --run -d
regression-test/suites/cloud_p0/cache/write_index_only -runMode=cloud`
- Result: `Test 3 suites, failed 0 suites, fatal 0 scripts, skipped 0
scripts`
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@bobhan1
bobhan1 marked this pull request as ready for review June 30, 2026 06:23
@bobhan1

bobhan1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@bobhan1

bobhan1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

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.

Automated review for PR #64995.

I found one issue in the new unit coverage: the empty-range loader test exits through the cloud-mode config gate before it reaches the branch it is intended to protect. The inline comment has the specific evidence.

Review notes:

  • Correctness: traced the BE/cloud storage, writer, packed-file, and cache-read paths; no production correctness issue was accepted.
  • Optimizer/rewrite scope: no FE/Nereids, join, aggregate, distribution, or planner-facing semantic changes were present.
  • Duplicate preflight: no existing inline review comments or replies were found for this PR.
  • Validation: git diff --check ac877e5cc4f27de76753794a4948d55bd425bf0a eaa67b1020c70f1844c0b86b6bd70938e1476698 -- <changed files> was clean. I did not run builds or tests because this checkout is missing .worktree_initialized and thirdparty/installed.
  • Convergence: both live subagents reviewed the current ledger and final comment set and replied NO_NEW_VALUABLE_FINDINGS.

Comment thread be/test/storage/cloud_file_cache_write_index_only_test.cpp
@bobhan1

bobhan1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

run performance

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The empty-range file cache loader unit test expected load_segment_index_to_file_cache to skip opening segment data, but it did not enable cloud mode, so the function returned at the cloud-mode config gate before reaching the empty-range guard. Enable cloud mode in the fixture, restore it in teardown, and make the S3 open path fail if an empty range ever tries to open the segment.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - `./run-be-ut.sh --run --filter=CloudFileCacheWriteIndexOnlyConfigTest.* -j100`
- Behavior changed: No
- Does this need documentation: No
@bobhan1

bobhan1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@bobhan1

bobhan1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

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.

Reviewed the GitHub-authoritative PR file set for PR 64995 and the relevant surrounding BE/cloud/cache/storage paths. I do not have a new inline issue to add.

Checkpoint conclusions:

  • Goal and coverage: the change adds cloud index-only file-cache behavior for rowset output, avoids segment-data cache writes, and preloads segment footer/common-index ranges after segment files close. The added BE tests and cloud regression suites cover option splitting, loader gates, vertical writer and vertical compaction paths, V1/V2 inverted index writers, packed-file behavior, compaction output, schema change, and profile counters.
  • Scope: the implementation is focused on cloud config, file-writer options, cached reader stats, packed-file lookup, rowset/segment writer close paths, and tests.
  • Concurrency/lifecycle: the new preload task vectors are protected by local mutexes and are drained after writer finalization/close ordering. Packed-file lookup continues to use PackedFileManager locking. I did not find a new lock-order or async lifetime issue.
  • Configuration: the new mutable cloud config is read at writer-option and loader execution points. Existing compaction index-only settings and the new global mode have explicit precedence tests.
  • Compatibility: no storage format or thrift/protocol compatibility issue found; segment/index ranges are used only for cache warming and read accounting.
  • Parallel paths: checked normal segment writer, vertical segment writer, vertical beta rowset writer, load, compaction, schema-change/local-rowset skip, packed files, and separate inverted-index files.
  • Tests/session/config: the existing inline thread about the empty-range test was treated as already-known review context. In the current head that test sets cloud mode and fails if the open-file path is reached, so I did not duplicate the comment.

User focus: no additional user-provided review focus was present.

Subagent conclusions: optimizer-rewrite found no optimizer/rewrite candidate. tests-session-config found no new test/config candidate beyond the existing empty-range thread. After the main ledger update and empty proposed final comment set, both live subagents returned NO_NEW_VALUABLE_FINDINGS in convergence round C1.

Validation: git diff --check is clean for the 31 files returned by the live GitHub PR files API. I did not run BE unit tests, regression tests, or a full build in this review runner.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29268 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit eaa67b1020c70f1844c0b86b6bd70938e1476698, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17666	4008	3977	3977
q2	2020	313	190	190
q3	10311	1415	793	793
q4	4679	464	338	338
q5	7558	842	574	574
q6	185	172	142	142
q7	806	845	623	623
q8	9374	1531	1528	1528
q9	5749	4416	4373	4373
q10	6751	1784	1524	1524
q11	452	276	244	244
q12	633	422	300	300
q13	18176	3366	2802	2802
q14	267	254	242	242
q15	q16	798	772	716	716
q17	1014	1009	1020	1009
q18	7469	5817	5624	5624
q19	1172	1179	1098	1098
q20	468	401	259	259
q21	5975	2611	2609	2609
q22	428	364	303	303
Total cold run time: 101951 ms
Total hot run time: 29268 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4296	4230	4239	4230
q2	295	309	209	209
q3	4553	4934	4462	4462
q4	2064	2142	1388	1388
q5	4456	4320	4332	4320
q6	233	183	133	133
q7	1714	1642	1949	1642
q8	2605	2220	2208	2208
q9	8142	8276	7817	7817
q10	4829	4697	4334	4334
q11	560	428	405	405
q12	764	759	548	548
q13	3217	3576	2968	2968
q14	305	315	270	270
q15	q16	699	728	671	671
q17	1344	1330	1330	1330
q18	7999	7334	7211	7211
q19	1192	1176	1150	1150
q20	2239	2215	1941	1941
q21	5280	4638	4445	4445
q22	520	452	394	394
Total cold run time: 57306 ms
Total hot run time: 52076 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 172487 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit eaa67b1020c70f1844c0b86b6bd70938e1476698, data reload: false

query5	4356	629	501	501
query6	471	191	174	174
query7	4816	581	321	321
query8	327	183	169	169
query9	8793	4164	4122	4122
query10	469	307	264	264
query11	5860	2345	2175	2175
query12	162	102	109	102
query13	1250	592	418	418
query14	6207	5286	4982	4982
query14_1	4302	4278	4266	4266
query15	217	199	181	181
query16	1009	483	427	427
query17	944	702	579	579
query18	2425	466	341	341
query19	210	182	144	144
query20	119	107	119	107
query21	223	144	118	118
query22	13568	13711	13362	13362
query23	17458	16477	16180	16180
query23_1	16265	16208	16239	16208
query24	7581	1826	1322	1322
query24_1	1326	1322	1341	1322
query25	591	490	416	416
query26	1326	331	176	176
query27	2699	581	364	364
query28	4470	2057	2040	2040
query29	1121	621	511	511
query30	316	241	202	202
query31	1127	1092	965	965
query32	134	67	62	62
query33	536	335	267	267
query34	1162	1164	672	672
query35	777	796	671	671
query36	1420	1392	1194	1194
query37	163	111	102	102
query38	1900	1722	1630	1630
query39	939	930	884	884
query39_1	879	891	873	873
query40	235	130	111	111
query41	77	75	70	70
query42	93	92	91	91
query43	325	332	285	285
query44	1454	809	792	792
query45	214	194	182	182
query46	1068	1220	773	773
query47	2393	2363	2202	2202
query48	430	439	314	314
query49	608	424	352	352
query50	985	374	274	274
query51	4457	4486	4279	4279
query52	85	87	80	80
query53	248	263	197	197
query54	312	253	227	227
query55	79	74	67	67
query56	253	264	234	234
query57	1434	1423	1329	1329
query58	263	218	227	218
query59	1555	1623	1399	1399
query60	303	264	247	247
query61	181	182	227	182
query62	692	651	580	580
query63	230	193	195	193
query64	2528	771	584	584
query65	4777	4798	4808	4798
query66	1832	486	346	346
query67	29794	29717	29582	29582
query68	3494	1614	1002	1002
query69	434	311	258	258
query70	1090	956	977	956
query71	302	221	222	221
query72	2987	2659	2319	2319
query73	860	828	452	452
query74	5143	5007	4776	4776
query75	2564	2544	2181	2181
query76	2437	1197	770	770
query77	354	410	292	292
query78	12559	12537	11776	11776
query79	1413	1166	733	733
query80	1259	467	430	430
query81	521	283	239	239
query82	682	157	126	126
query83	348	280	248	248
query84	317	151	114	114
query85	923	533	407	407
query86	450	314	271	271
query87	1840	1828	1792	1792
query88	3764	2808	2782	2782
query89	435	379	339	339
query90	1890	187	191	187
query91	178	160	132	132
query92	64	63	59	59
query93	1600	1504	989	989
query94	756	363	311	311
query95	710	486	354	354
query96	1058	804	370	370
query97	2708	2698	2583	2583
query98	209	205	197	197
query99	1173	1153	1012	1012
Total cold run time: 259598 ms
Total hot run time: 172487 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.3 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit eaa67b1020c70f1844c0b86b6bd70938e1476698, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.04	0.05
query3	0.26	0.13	0.13
query4	1.62	0.16	0.13
query5	0.24	0.23	0.23
query6	1.24	1.09	1.06
query7	0.04	0.00	0.01
query8	0.06	0.04	0.03
query9	0.38	0.32	0.32
query10	0.54	0.55	0.53
query11	0.21	0.15	0.14
query12	0.19	0.14	0.16
query13	0.46	0.47	0.47
query14	1.01	1.01	1.02
query15	0.61	0.60	0.59
query16	0.33	0.34	0.31
query17	1.06	1.11	1.10
query18	0.22	0.20	0.21
query19	2.00	1.93	1.97
query20	0.02	0.01	0.02
query21	15.46	0.21	0.15
query22	4.89	0.06	0.05
query23	16.14	0.31	0.12
query24	3.05	0.41	0.35
query25	0.14	0.05	0.05
query26	0.74	0.20	0.14
query27	0.04	0.03	0.04
query28	3.54	0.93	0.56
query29	12.51	4.28	3.42
query30	0.27	0.15	0.16
query31	2.77	0.59	0.30
query32	3.23	0.60	0.49
query33	3.17	3.19	3.21
query34	15.55	4.26	3.57
query35	3.51	3.52	3.56
query36	0.56	0.43	0.43
query37	0.10	0.07	0.07
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.16
query41	0.09	0.03	0.03
query42	0.05	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.73 s
Total hot run time: 25.3 s

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 30033 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 46f30f9df927403bc6db6170de2df5b0e2f61757, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17608	3989	3956	3956
q2	2109	328	200	200
q3	10314	1453	826	826
q4	4683	473	342	342
q5	7533	882	593	593
q6	185	175	140	140
q7	775	947	632	632
q8	9403	1643	1567	1567
q9	5661	4434	4449	4434
q10	6778	1819	1552	1552
q11	512	355	345	345
q12	726	558	421	421
q13	18216	3351	2751	2751
q14	272	265	241	241
q15	q16	778	782	718	718
q17	1060	1023	1012	1012
q18	7387	5960	5552	5552
q19	1315	1258	1024	1024
q20	757	666	571	571
q21	6678	2840	2821	2821
q22	482	383	335	335
Total cold run time: 103232 ms
Total hot run time: 30033 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4990	4802	4777	4777
q2	289	349	215	215
q3	4888	5340	4728	4728
q4	2431	2187	1384	1384
q5	4981	4670	4675	4670
q6	237	188	141	141
q7	1912	1762	1535	1535
q8	2396	2086	2055	2055
q9	7714	7279	7229	7229
q10	4769	4657	4196	4196
q11	526	415	359	359
q12	740	734	523	523
q13	3060	3405	2783	2783
q14	281	275	249	249
q15	q16	672	705	618	618
q17	1307	1250	1254	1250
q18	7408	6991	6970	6970
q19	1158	1104	1111	1104
q20	2228	2203	1955	1955
q21	5280	4606	4449	4449
q22	537	456	414	414
Total cold run time: 57804 ms
Total hot run time: 51604 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 174087 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 46f30f9df927403bc6db6170de2df5b0e2f61757, data reload: false

query5	4306	643	496	496
query6	445	223	205	205
query7	4845	579	348	348
query8	357	195	174	174
query9	8762	4126	4118	4118
query10	448	367	297	297
query11	5986	2379	2127	2127
query12	178	105	107	105
query13	1277	647	467	467
query14	6250	5305	4996	4996
query14_1	4336	4344	4336	4336
query15	212	206	185	185
query16	1003	477	464	464
query17	957	767	617	617
query18	2461	457	347	347
query19	202	186	141	141
query20	109	105	104	104
query21	236	155	137	137
query22	13770	13536	13438	13438
query23	17457	16571	16057	16057
query23_1	16298	16249	16239	16239
query24	7464	1742	1311	1311
query24_1	1329	1323	1299	1299
query25	536	443	361	361
query26	1339	345	213	213
query27	2603	590	399	399
query28	4486	2060	2012	2012
query29	1083	612	507	507
query30	337	267	226	226
query31	1117	1086	990	990
query32	105	61	61	61
query33	537	327	257	257
query34	1193	1112	649	649
query35	759	793	696	696
query36	1362	1406	1213	1213
query37	154	106	95	95
query38	1888	1719	1649	1649
query39	925	908	910	908
query39_1	889	893	872	872
query40	244	163	140	140
query41	65	63	62	62
query42	91	92	91	91
query43	322	320	284	284
query44	1425	790	772	772
query45	210	191	181	181
query46	1073	1232	754	754
query47	2289	2321	2212	2212
query48	417	408	300	300
query49	606	448	327	327
query50	1040	451	351	351
query51	4482	4372	4346	4346
query52	92	90	78	78
query53	268	291	210	210
query54	325	228	218	218
query55	78	72	68	68
query56	293	320	290	290
query57	1438	1411	1330	1330
query58	298	268	254	254
query59	1572	1630	1408	1408
query60	305	274	254	254
query61	147	150	149	149
query62	684	649	575	575
query63	243	205	221	205
query64	2587	782	614	614
query65	4868	4784	4757	4757
query66	1875	522	389	389
query67	29779	29676	29589	29589
query68	3194	1579	1010	1010
query69	409	315	272	272
query70	1059	913	960	913
query71	344	331	309	309
query72	2938	2652	2259	2259
query73	861	776	428	428
query74	5083	4982	4766	4766
query75	2602	2599	2206	2206
query76	2379	1210	792	792
query77	356	376	289	289
query78	12467	12441	11938	11938
query79	1215	1132	773	773
query80	612	551	464	464
query81	480	331	282	282
query82	240	157	125	125
query83	315	320	296	296
query84	317	162	129	129
query85	916	648	503	503
query86	350	293	293	293
query87	1841	1842	1780	1780
query88	3704	2846	2835	2835
query89	428	401	368	368
query90	2160	208	200	200
query91	202	189	165	165
query92	66	63	60	60
query93	1669	1623	941	941
query94	532	364	328	328
query95	813	623	478	478
query96	1012	855	359	359
query97	2674	2708	2604	2604
query98	219	203	201	201
query99	1166	1168	1027	1027
Total cold run time: 258237 ms
Total hot run time: 174087 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.25 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 46f30f9df927403bc6db6170de2df5b0e2f61757, data reload: false

query1	0.01	0.01	0.01
query2	0.12	0.05	0.05
query3	0.26	0.14	0.14
query4	1.62	0.14	0.15
query5	0.26	0.23	0.22
query6	1.24	1.06	1.03
query7	0.04	0.01	0.01
query8	0.06	0.04	0.03
query9	0.38	0.30	0.32
query10	0.56	0.57	0.54
query11	0.20	0.14	0.14
query12	0.18	0.14	0.14
query13	0.48	0.48	0.47
query14	1.01	1.01	1.00
query15	0.61	0.59	0.61
query16	0.32	0.33	0.34
query17	1.14	1.12	1.18
query18	0.22	0.21	0.22
query19	2.03	1.99	1.95
query20	0.02	0.01	0.02
query21	15.49	0.20	0.14
query22	4.66	0.05	0.06
query23	16.12	0.30	0.12
query24	3.14	0.45	0.35
query25	0.11	0.06	0.05
query26	0.79	0.20	0.16
query27	0.05	0.04	0.04
query28	3.48	1.00	0.55
query29	12.48	4.28	3.47
query30	0.28	0.16	0.16
query31	2.77	0.60	0.31
query32	3.22	0.62	0.49
query33	3.15	3.14	3.17
query34	15.73	4.20	3.48
query35	3.55	3.54	3.50
query36	0.57	0.44	0.43
query37	0.09	0.06	0.06
query38	0.06	0.04	0.03
query39	0.04	0.03	0.03
query40	0.18	0.17	0.16
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.88 s
Total hot run time: 25.25 s

@bobhan1

bobhan1 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

run nonConcurrent

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 75.28% (265/352) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.14% (28492/38429)
Line Coverage 57.99% (310220/534958)
Region Coverage 54.74% (259512/474078)
Branch Coverage 56.04% (112669/201062)

@gavinchou

Copy link
Copy Markdown
Contributor

skip check_coverage

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@gavinchou
gavinchou merged commit 73c481f into apache:master Jul 1, 2026
33 of 34 checks passed
yiguolei pushed a commit that referenced this pull request Jul 13, 2026
)

### What problem does this PR solve?

Issue Number: N/A

Related PR: #64995

Problem Summary:

Pick master commit `73c481f65848ed5f449fad2ac9e7c59cf54bcf9e` to
`branch-4.1` to support file cache write index only in cloud mode.

Adaptations for `branch-4.1`:
- Keep the existing `IndexFileWriter` constructor shape on `branch-4.1`.
- Drop the unused master-only `row_binlog_segment_writer.h` include.

Validation note:
- The docker regression was run with an uncommitted local workaround
following #65142, because `branch-4.1` does not have that docker-compose
fix yet.

### Release note

Support file cache write index only in cloud mode.

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [x] Unit Test
    - [x] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

Manual test:
- `git diff --check upstream/branch-4.1...HEAD`
- `./run-be-ut.sh --run --filter=CloudFileCacheWriteIndexOnly* -j100`
- `./build.sh --be --fe --cloud -j100`
- `docker build -f docker/runtime/doris-compose/Dockerfile -t
bh-cluster-2 .`
- `./run-regression-test.sh --run -d
regression-test/suites/cloud_p0/cache/write_index_only -g docker
-runMode=cloud -dockerSuiteParallel 1`

- Behavior changed:
    - [ ] No.
    - [x] Yes. Support file cache write index only in cloud mode.

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
morningman pushed a commit that referenced this pull request Jul 28, 2026
)

### What problem does this PR solve?

Issue Number: N/A

Related PR: #64995
bobhan1 added a commit to apache/doris-website that referenced this pull request Jul 28, 2026
## Summary

- document the global `enable_file_cache_write_index_file_only` policy,
including its scope, precedence, expected behavior, configuration
example, and operational trade-offs
- document the Base and Cumulative Compaction-specific index-only
policies and clarify that they refine existing cache-write decisions
- add the related index and Segment footer/index profile metrics
- update the File Cache internals page to keep the Compaction behavior
description consistent

## Related Doris PRs

- apache/doris#60609
- apache/doris#64995

## Scope

This PR updates the current and 4.x File Cache documentation in English,
Chinese, and Japanese. Japanese source pages are updated under
`ja-source`.

## Validation

- `git diff --check`
- reviewed the documented configuration names, precedence, and behavior
against the current Doris master implementation and the related PR
descriptions
- verified that the added current and 4.x content is aligned across all
three languages
- Docusaurus build not run, following the request to keep this round
limited to documentation content

## Versions

- [x] dev
- [x] 4.x
- [ ] 3.x
- [ ] 2.1 or older (not covered by version/language sync gate)

## Languages

- [x] Chinese
- [x] English
- [x] Japanese candidate translation needed

## Docs Checklist

- [x] Checked by AI
- [ ] Test Cases Built
- [x] Updated required version and language counterparts, or explained
why not
- [x] If only one language changed, confirmed whether source/translation
counterparts need sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.1.x dev/4.0.8-merged dev/4.1.4-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants