Yukang-Lian opened a new pull request, #61222:
URL: https://github.com/apache/doris/pull/61222

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   Previously, manually triggering full compaction on a single tablet via HTTP 
API would create a detached thread for each request, which lacks concurrency 
control, deduplication, and metrics tracking.
   
   This PR changes the single-tablet full compaction path to use 
`submit_compaction_task()`, submitting to the base compaction thread pool — 
consistent with the table-level path and the cloud engine. Base and cumulative 
compaction remain unchanged.
   
   Added `force` HTTP parameter to skip permit limiter when submitting full 
compaction, allowing compaction to proceed even when resources are constrained.
   
   ### Usage
   
   ```bash
   # single tablet, default (with permit limiter)
   curl -X POST 
"http://be_host:http_port/api/compaction/run?tablet_id=12345&compact_type=full";
   
   # single tablet, force (skip permit limiter)
   curl -X POST 
"http://be_host:http_port/api/compaction/run?tablet_id=12345&compact_type=full&force=true";
   
   # table level
   curl -X POST 
"http://be_host:http_port/api/compaction/run?table_id=67890&compact_type=full";
   
   # table level, force
   curl -X POST 
"http://be_host:http_port/api/compaction/run?table_id=67890&compact_type=full&force=true";
   ```
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test.
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Single-tablet manual full compaction now submits to thread 
pool instead of detached thread. Added force parameter to skip permit limiter.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### 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