Skip to content

Conversation

@liaoxin01
Copy link
Contributor

pick: #60160

…0160)

1. Use rs_meta.fs() instead of storage_resource.value()->fs in warm up
functions to support packed files. PackedFileSystem wrapper in
rs_meta.fs() handles the index_map lookup and reads from the correct
packed file path with proper offset.

Without this fix, warm up would try to directly open the segment/index
path which does not exist on S3 because the data is actually stored in a
packed file.

   Fixed locations:
- CloudWarmUpManager::handle_jobs(): segment and inverted index download
- CloudInternalServiceImpl::warm_up_rowset(): segment and inverted index
download

2. Fix packed_file_manager to use correct TTL cache type when writing
small files to file cache. Previously it always used
FileCacheType::NORMAL, causing ttl_cache_size mismatch between source
and target clusters during warm up.

Now expiration_time is passed through PackedAppendContext and used to
set the correct cache type (TTL when expiration_time > 0, NORMAL
otherwise).
Copilot AI review requested due to automatic review settings January 24, 2026 15:11
@liaoxin01 liaoxin01 requested a review from yiguolei as a code owner January 24, 2026 15:11
@Thearas
Copy link
Contributor

Thearas commented Jan 24, 2026

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
Contributor Author

run buildall

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issues with packed file warmup that prevented reading small files. It implements two key fixes: (1) using rs_meta.fs() instead of storage_resource.value()->fs to support packed files through the PackedFileSystem wrapper, and (2) ensuring the correct TTL cache type is used when writing small files to file cache.

Changes:

  • Updated warmup code paths to use rs_meta.fs() which includes PackedFileSystem wrapper for handling packed files
  • Added expiration_time to PackedAppendContext and propagated it through the file cache write path
  • Added regression test to validate packed file warmup with TTL cache verification

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test_packed_file_warm_up_cluster_event.groovy New regression test for packed file warmup with event-driven sync and TTL cache validation
rowset_writer_context.h Added expiration_time calculation for PackedAppendContext based on file_cache_ttl_sec and newest_write_timestamp
packed_file_manager.h Added expiration_time field to PackedAppendContext struct
packed_file_manager.cpp Updated cache write functions to use expiration_time for determining correct cache type (TTL vs NORMAL)
cloud_warm_up_manager.cpp Changed from storage_resource.value()->fs to rs->fs() for segment and index downloads to support packed files
cloud_internal_service.cpp Changed from storage_resource.value()->fs to rs_meta.fs() for segment and index downloads to support packed files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 64.71% (11/17) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.75% (18911/35848)
Line Coverage 35.85% (175556/489705)
Region Coverage 32.49% (135848/418087)
Branch Coverage 33.35% (58890/176560)

@liaoxin01 liaoxin01 changed the title [fix](cloud) fix packed file warmup cannot read small files (#60160) branch-4.0: [fix](cloud) fix packed file warmup cannot read small files (#60160) Jan 26, 2026
@yiguolei
Copy link
Contributor

skip buildall

@yiguolei yiguolei merged commit 48f64d6 into apache:branch-4.0 Jan 26, 2026
36 of 38 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.

4 participants