branch-4.1: [fix](filecache) fix flaky be UT for LRU dump (pick#65427)#65425
Open
freemandealer wants to merge 1 commit into
Open
branch-4.1: [fix](filecache) fix flaky be UT for LRU dump (pick#65427)#65425freemandealer wants to merge 1 commit into
freemandealer wants to merge 1 commit into
Conversation
### What problem does this PR solve?
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.
### Release note
None
### Check List (For Author)
- 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
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
Member
Author
|
/review |
Contributor
There was a problem hiding this comment.
Automated review summary for PR 65425 at 7c0c876.
I found no blocking or inline-worthy issues in this patch.
Critical checkpoints:
- Scope/head: verified the live PR still points to head 7c0c876 on base 7126cf6, with one changed file: be/test/io/cache/block_file_cache_test_meta_store.cpp.
- Existing review context: no existing inline review comments or replies were present, so there were no duplicate issues to suppress.
- Test behavior: the changed test now calls cache.dump_lru_queues(true) after replay_lru_logs_once() has drained the pending removal records and before the restart phase. The related implementation synchronously dumps the shadow LRU queues under _dump_lru_queues_mtx, so this matches the persisted restart state the test is validating and removes the previous timing dependency on the background dump interval.
- Config/session compatibility: the modified test already saves and restores the affected file-cache config values through Defer, and this patch does not touch runtime configuration propagation or production behavior.
- Validation: git diff --check FETCH_HEAD..HEAD -- be/test/io/cache/block_file_cache_test_meta_store.cpp passed. I did not run the targeted BE UT in this runner because thirdparty/installed and thirdparty/installed/bin/protoc are absent.
- User focus: no additional user-provided review focus was specified.
Subagent conclusions:
- optimizer-rewrite: found no optimizer/rewrite, semantic-equivalence, join, aggregate, or parallel plan-path issue; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.
- tests-session-config: found no regression-test, expected-output, session/config propagation, compatibility, or basic style issue; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.
Overall opinion: the patch is a narrowly scoped deterministic test fix and looks good from static review.
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
BlockFileCacheTest.version3_add_remove_restartrelied 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.Release note
None
Check List (For Author)
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_restartgit diff --check -- be/test/io/cache/block_file_cache_test_meta_store.cpp