Skip to content

branch-4.0: [fix](filecache) reject oversized block size in add_cell #62878#63045

Merged
yiguolei merged 1 commit into
branch-4.0from
auto-pick-62878-branch-4.0
May 10, 2026
Merged

branch-4.0: [fix](filecache) reject oversized block size in add_cell #62878#63045
yiguolei merged 1 commit into
branch-4.0from
auto-pick-62878-branch-4.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 7, 2026

Cherry-picked from #62878

When directory_entry::file_size(ec) fails, it returns (uintmax_t)-1.
load_cache_info_into_memory did not check ec, so UINT64_MAX flowed into
add_cell, which only warned and then registered the cell — corrupting
_files, LRUQueue::cache_size, _cur_cache_size, and the LRU dump
(survives restart).

- fs_file_cache_storage: check ec after file_size, skip on error
- add_cell: turn the >1GiB check into a hard reject (return nullptr)
- UT: add_cell_rejects_oversized_size
@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?

@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

@github-actions
Copy link
Copy Markdown
Contributor Author

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

@github-actions github-actions Bot added approved Indicates a PR has been approved by one committer. reviewed labels May 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor Author

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 70c1a8a into branch-4.0 May 10, 2026
28 of 32 checks passed
@github-actions github-actions Bot deleted the auto-pick-62878-branch-4.0 branch May 10, 2026 10:59
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants