Skip to content

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

Merged
freemandealer merged 2 commits into
branch-4.0from
auto-pick-62437-branch-4.0
Jun 25, 2026
Merged

branch-4.0: [fix](filecache) avoid crash when late holder cleanup sees removed cache cell #62437#63955
freemandealer merged 2 commits into
branch-4.0from
auto-pick-62437-branch-4.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #62437

@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

CategoryCoverage
Function Coverage53.23% (19412/36466)
Line Coverage36.38% (181344/498514)
Region Coverage33.01% (141028/427266)
Branch Coverage33.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

CategoryCoverage
Function Coverage71.23% (25428/35699)
Line Coverage54.07% (269089/497631)
Region Coverage51.62% (222777/431592)
Branch Coverage53.07% (95916/180725)

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jun 24, 2026
@github-actions

Copy link
Copy Markdown
ContributorAuthor

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

@github-actions

Copy link
Copy Markdown
ContributorAuthor

PR approved by anyone and no changes requested.

…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 -->
@morningman
morningmanforce-pushed the auto-pick-62437-branch-4.0 branch from bf185dc to a733130CompareJune 24, 2026 09:56
@morningman

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

CategoryCoverage
Function Coverage53.35% (19462/36483)
Line Coverage36.48% (182008/498964)
Region Coverage33.12% (141672/427734)
Branch Coverage33.93% (61210/180376)

@freemandealer

Copy link
Copy Markdown
Member

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

CategoryCoverage
Function Coverage53.36% (19500/36542)
Line Coverage36.48% (182508/500228)
Region Coverage33.08% (141981/429144)
Branch Coverage33.94% (61385/180844)

@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

CategoryCoverage
Function Coverage71.50% (25562/35750)
Line Coverage54.39% (271181/498571)
Region Coverage52.00% (224959/432583)
Branch Coverage53.39% (96783/181270)

@freemandealer
freemandealer merged commit 821593d into branch-4.0Jun 25, 2026
28 of 30 checks passed
@github-actions
github-actionsBot deleted the auto-pick-62437-branch-4.0 branch June 25, 2026 02:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hello-stephen@morningman@freemandealer