Skip to content

branch-3.1: [enhancement](cloud) Persist LRU information for file cache #49456 - #52811

Merged
morrySnow merged 1 commit into
apache:branch-3.1from
freemandealer:pick-lru-persist-for-3.1
Jul 7, 2025
Merged

branch-3.1: [enhancement](cloud) Persist LRU information for file cache #49456#52811
morrySnow merged 1 commit into
apache:branch-3.1from
freemandealer:pick-lru-persist-for-3.1

Conversation

@freemandealer

@freemandealerfreemandealer commented Jul 4, 2025

Copy link
Copy Markdown
Member

pick #49456

…9456)
When the system restarts, the LRU queue in memory is lost due to lack of
persistence. This requires re-scanning the disk directory to load data,
leading to the following issues:
1. The loading order after restart depends on directory traversal, and
the original eviction order cannot be preserved.
2. If the system enters resource limit mode after restart, it may
mistakenly delete frequently accessed hot data by users.
In this commit, we periodically dump the LRU queue information to disk
and rebuild the LRU queue upon restart. Considering that the LRU content
may be extensive, we only dump the tail end (the part that will be
evicted first) of the LRU queue, with the specific quantity configured
by the config.
@Thearas

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?

@freemandealer

Copy link
Copy Markdown
MemberAuthor

run buildall

@freemandealerfreemandealer changed the title [enhancement](cloud) Persist LRU information for file cache (#49456)[enhancement](cloud) Persist LRU information for file cache (pick #49456)Jul 4, 2025
@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage83.83% (1192/1422)
Line Coverage67.91% (21036/30977)
Region Coverage67.48% (10433/15462)
Branch Coverage56.99% (5500/9650)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 78.14% (529/677) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage45.19% (12439/27526)
Line Coverage36.15% (110220/304857)
Region Coverage35.28% (57176/162073)
Branch Coverage32.37% (31003/95764)

@freemandealer

Copy link
Copy Markdown
MemberAuthor

run p0

@morrySnowmorrySnow changed the title [enhancement](cloud) Persist LRU information for file cache (pick #49456)branch-3.1: [enhancement](cloud) Persist LRU information for file cache #49456Jul 7, 2025
@morrySnow
morrySnow merged commit a92ada5 into apache:branch-3.1Jul 7, 2025
Sign up for freeto 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.

5 participants

@freemandealer@Thearas@hello-stephen@gavinchou@morrySnow