Skip to content

branch-4.0:[fix](filecache) fix flaky be UT for LRU dump(pick#65427) - #66130

Merged
morningman merged 1 commit into
apache:branch-4.0from
freemandealer:pick-branch-4.0-pr-65427
Jul 28, 2026
Merged

branch-4.0:[fix](filecache) fix flaky be UT for LRU dump(pick#65427)#66130
morningman merged 1 commit into
apache:branch-4.0from
freemandealer:pick-branch-4.0-pr-65427

Conversation

@freemandealer

@freemandealer freemandealer commented Jul 27, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: N/A

Related PR: #65427

Problem Summary: Pick #65427 into branch-4.0.

Release note

None

Check List (For Author)

  • Test:
    • Format: build-support/clang-format.sh and build-support/check-format.sh passed.
    • BE: JAVA_HOME=/mnt/disk1/zhangzhengyu/build-dep/jdk-17.0.2/ DORIS_TOOLCHAIN=clang DISABLE_BE_JAVA_EXTENSIONS=ON ENABLE_INJECTION_POINT=ON ENABLE_CACHE_LOCK_DEBUG=0 ENABLE_PCH=0 ./build.sh --be
    • BE UT: same environment, sh run-be-ut.sh --run --filter=CacheLRUDumperTest.*
  • Behavior changed: No
  • Does this need documentation: No

Issue Number: None

Related PR: None

Problem Summary: BlockFileCacheTest.version3_add_remove_restart relied on sleeping for the background LRU dump thread after replaying remove records. If the background dump did not run before the restart phase, stale LRU tail records could be restored and the restarted cache could report non-empty queues. The test now explicitly dumps LRU queues after replaying the remove logs, so persisted LRU state is synchronized before the restart check without changing file cache runtime code.

None

- Test:
    - Unit Test: DORIS_TOOLCHAIN=clang DISABLE_BE_JAVA_EXTENSIONS=ON ENABLE_INJECTION_POINT=ON ENABLE_CACHE_LOCK_DEBUG=0 ENABLE_PCH=0 sh run-be-ut.sh --run --filter=BlockFileCacheTest.version3_add_remove_restart
    - Style check: git diff --check -- be/test/io/cache/block_file_cache_test_meta_store.cpp
- Behavior changed: No
- Does this need documentation: No
@freemandealer

Copy link
Copy Markdown
Member Author

run buildall

@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

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.56% (19586/36568)
Line Coverage 36.62% (183311/500588)
Region Coverage 33.20% (142631/429549)
Branch Coverage 34.04% (61632/181036)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.47% (25570/35775)
Line Coverage 54.42% (271501/498934)
Region Coverage 52.07% (225432/432977)
Branch Coverage 53.41% (96925/181458)

@morningman
morningman merged commit 072e7c7 into apache:branch-4.0 Jul 28, 2026
28 of 31 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.

3 participants