Skip to content

branch-4.2: [fix](packed-file) Honor write_file_cache option for packed small files #69693 - #70114

Merged
yiguolei merged 1 commit into
apache:branch-4.2from
liaoxin01:pick-69693-branch-4.2
Nov 4, 2026
Merged

yiguolei merged 1 commit into
apache:branch-4.2from
liaoxin01:pick-69693-branch-4.2

Conversation

@liaoxin01

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: #69693

Problem Summary:

Backport #69693 to branch-4.2.

With packed files enabled, a load using disable_file_cache=true could still populate the file cache because the packed writer ignored the caller's option. Always propagate FileWriterOptions::write_file_cache to the packed append context.

The test insertion conflict was resolved without importing the unrelated nonzero-first-segment feature/test, which is absent on this branch. Includes the cache-option unit test and preserves the original accessor cleanup.

Release note

Fix packed-file loads with disable_file_cache=true unexpectedly populating the file cache.

Check List (For Author)

  • Test: clang-format 16 and git diff --check passed. BE unit tests are included but were not run locally: the test entry point was blocked by the Mac's unaccepted Xcode license. CI run buildall is requested separately after PR creation.
  • Behavior changed: Yes. Packed writes now honor the caller's file-cache setting.
  • Does this need documentation: No.

…es (apache#69693)

Issue Number: None

Related PR: apache#59892, apache#60411, apache#64995

Problem Summary:

When packed file is enabled, the first segment file (`.dat`) and the
index file (`.idx`) of a rowset are written through `PackedFileSystem`.
The packed path decides whether to cache each small file from
`PackedAppendContext::write_file_cache`, which defaults to `true`.
`RowsetWriterContext` never sets this field.

(cherry picked from commit bf58c2c)

Backport to branch-4.2: resolve the test insertion conflict without bringing in the unrelated nonzero-first-segment test, whose feature is absent on this branch.

Validation: clang-format 16 and git diff --check passed. BE UT could not start because the local Xcode license has not been accepted.
@liaoxin01
liaoxin01 requested a review from yiguolei as a code owner November 3, 2026 11:04
@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?

@liaoxin01

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 64.78% (30358/46862)
Line Coverage 49.68% (321523/647127)
Region Coverage 45.49% (259204/569805)
Branch Coverage 47.14% (122483/259852)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.38% (34762/45514)
Line Coverage 61.25% (393057/641728)
Region Coverage 58.02% (331083/570661)
Branch Coverage 59.02% (153187/259540)

@yiguolei
yiguolei merged commit 9e4b43c into apache:branch-4.2 Nov 4, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants