Skip to content

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

Open
freemandealer wants to merge 1 commit into
apache:branch-4.1from
freemandealer:pick-branch-4.1-pr-64321-20260612
Open

branch-4.1: [fix](filecache) Disable sync file cache clear in http api(pick#64321)#64461
freemandealer wants to merge 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 freemandealer requested a review from yiguolei as a code owner June 12, 2026 09:58
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.

1 participant