gavinchou opened a new pull request, #65477:
URL: https://github.com/apache/doris/pull/65477

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary:
   
   File cache paths configured with zero capacity only resolved the disk size 
at startup. Runtime disk expansion or shrink did not update the effective 
capacity or the four queue limits. Manual reset returned free-form text, and 
shrinking synchronously could hold the cache lock while deleting many blocks.
   
   This PR adds:
   
   - Explicit per-path AUTO/MANUAL capacity policy and generation tracking.
   - One disk snapshot per BlockFileCache monitor tick, shared by resize and 
disk-watermark checks.
   - A common capacity planner plus atomic BlockFileCache apply for total and 
queue limits.
   - Batched asynchronous eviction after shrink.
   - Factory prepare-all/apply-all orchestration and on-demand capacity 
aggregation.
   - Structured reset responses and an `op=info` endpoint.
   - SyncPoint-based unit tests for disk expansion, shrink, failure, and 
stale-plan races.
   
   ### Release note
   
   Support automatic runtime file cache capacity updates for disk-backed paths 
configured with zero capacity. The file cache reset API now accepts zero to 
restore AUTO mode and returns structured capacity details. `op=info` exposes 
per-path capacity, disk, queue, and resize state.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
           - `BlockFileCacheTest.*:FileCacheActionTest.*`: 141 tests, 138 
passed, 3 disabled.
           - New capacity and HTTP smoke set: 16/16 passed.
           - Full BE UT: 9495 tests, 9438 passed, 57 skipped.
           - Release BE build: `source custom_env.sh && sh build.sh --be -j 16`.
           - Format: `build-support/check-format.sh`.
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] 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.
           - [ ] Other reason
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Disk cache capacity 0 is a persistent AUTO mode; reset 
capacity 0 restores AUTO mode; queue quotas update with capacity; shrink 
converges asynchronously.
   
   - Does this need documentation?
       - [ ] No.
       - [x] Yes. File Cache operations documentation should describe AUTO 
mode, the structured reset response, and `op=info`.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to