Skip to content

branch-4.0: [fix](filecache) avoid crash when late holder cleanup sees removed cache cell #62437#63955

Open
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-62437-branch-4.0
Open

branch-4.0: [fix](filecache) avoid crash when late holder cleanup sees removed cache cell #62437#63955
github-actions[bot] wants to merge 1 commit into
branch-4.0from
auto-pick-62437-branch-4.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 1, 2026

Cherry-picked from #62437

…che cell (#62437)

Problem Summary:
When FileBlocksHolder is destroyed late, the corresponding file block
may already be removed or replaced in block file cache metadata.
`BlockFileCache::remove()` can dereference a stale cache cell during
duplicate cleanup and crash.

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [x] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [x] Other reason <!-- Add your reason?  -->
- Cherry-pick only. The picked commits already include BE unit-test
coverage, and no local build/test was requested for this task.

- Behavior changed:
    - [ ] No.
    - [x] Yes. <!-- Explain the behavior change -->
- Avoid crash when late holder cleanup sees a removed or replaced cache
cell, add warning logs for skipped duplicate remove, and add BE unit
tests for the stale/replaced-cell cleanup paths.

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
@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

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (29/29) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.23% (19412/36466)
Line Coverage 36.38% (181344/498514)
Region Coverage 33.01% (141028/427266)
Branch Coverage 33.87% (61004/180092)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (29/29) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.23% (25428/35699)
Line Coverage 54.07% (269089/497631)
Region Coverage 51.62% (222777/431592)
Branch Coverage 53.07% (95916/180725)

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.

2 participants