Skip to content

Conversation

@freemandealer
Copy link
Contributor

@freemandealer freemandealer commented Jul 4, 2025

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.
@freemandealer freemandealer requested a review from morrySnow as a code owner July 4, 2025 14:01
@Thearas
Copy link
Contributor

Thearas commented Jul 4, 2025

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

run buildall

@freemandealer freemandealer 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
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.83% (1192/1422)
Line Coverage 67.91% (21036/30977)
Region Coverage 67.48% (10433/15462)
Branch Coverage 56.99% (5500/9650)

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 78.14% (529/677) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 45.19% (12439/27526)
Line Coverage 36.15% (110220/304857)
Region Coverage 35.28% (57176/162073)
Branch Coverage 32.37% (31003/95764)

@freemandealer
Copy link
Contributor Author

run p0

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

5 participants