Skip to content

branch-4.1: [fix](filecache) Disable sync file cache clear in http api(pick#64321) - #64461

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
freemandealer:pick-branch-4.1-pr-64321-20260612
Jun 16, 2026
Merged

branch-4.1: [fix](filecache) Disable sync file cache clear in http api(pick#64321)#64461
yiguolei merged 1 commit into
apache:branch-4.1from
freemandealer:pick-branch-4.1-pr-64321-20260612

Conversation

@freemandealer

Copy link
Copy Markdown
Member

Pick from #64321

### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: The file cache HTTP clear endpoint allowed callers to request synchronous clear with sync=true. The synchronous clear path is kept for unit tests and internal callers, but it is not safe to expose through the HTTP API. This change makes the HTTP op=clear endpoint always use async clear. The default behavior remains async, and explicit sync=true returns a warning message while still running async clear. Segment-specific HTTP clear also uses async remove instead of the synchronous remove path.
### Release note
The BE /api/file_cache?op=clear HTTP API no longer supports synchronous clearing. Requests with sync=true now run async clear and return a warning message.
### 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=FileCacheActionTest.*
- Behavior changed: Yes. HTTP file cache clear no longer exposes synchronous clear.
- Does this need documentation: No
(cherry picked from commit 29d3a6f)
Picked-from: apache#64321
@freemandealer

Copy link
Copy Markdown
MemberAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (8/8) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage53.86% (20393/37861)
Line Coverage37.44% (193417/516608)
Region Coverage33.82% (150752/445784)
Branch Coverage34.83% (66018/189568)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 75.00% (6/8) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage73.52% (27226/37030)
Line Coverage57.13% (294043/514690)
Region Coverage54.81% (246484/449684)
Branch Coverage56.24% (106890/190055)

@yiguolei
yiguolei merged commit 4d15377 into apache:branch-4.1Jun 16, 2026
28 of 32 checks passed
Sign up for freeto 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

@freemandealer@hello-stephen@yiguolei