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

   ## Summary
   
   - Introduce `CompactionTaskTracker` singleton to provide full lifecycle 
observability for base/cumulative/full compaction tasks (PENDING → RUNNING → 
FINISHED/FAILED)
   - Add `information_schema.be_compaction_tasks` system table (38 columns) 
with multi-BE fan-out query support
   - Add `GET /api/compaction/profile` HTTP API with 
tablet_id/top_n/compact_type/success filtering
   - Integrate tracker at all compaction entry points: local background, cloud 
background, manual HTTP trigger, load-triggered
   - Track vertical compaction progress (total_groups/completed_groups) via 
callback through `Merger::vertical_merge_rowsets`
   - Support three trigger methods: AUTO / MANUAL / LOAD_TRIGGERED
   - Add `enable_compaction_task_tracker` switch and configurable 
`compaction_task_tracker_max_records` (default 10000, ~5MB)
   
   ## Usage Examples
   
   ```sql
   -- View running compaction tasks across all BEs
   SELECT BACKEND_ID, TABLET_ID, COMPACTION_TYPE, ELAPSED_TIME_MS
   FROM information_schema.be_compaction_tasks
   WHERE STATUS = 'RUNNING' ORDER BY ELAPSED_TIME_MS DESC;
   
   -- Track vertical compaction progress
   SELECT TABLET_ID, VERTICAL_COMPLETED_GROUPS, VERTICAL_TOTAL_GROUPS,
          CONCAT(ROUND(VERTICAL_COMPLETED_GROUPS * 100.0 / 
NULLIF(VERTICAL_TOTAL_GROUPS, 0), 1), '%') AS progress
   FROM information_schema.be_compaction_tasks
   WHERE STATUS = 'RUNNING' AND IS_VERTICAL = true;
   ```
   
   ```bash
   # HTTP API: query recent compaction profiles
   curl "http://BE_HOST:PORT/api/compaction/profile?tablet_id=12345&top_n=5";
   ```
   
   ## Test plan
   
   - [x] 15 unit tests (`CompactionTaskTrackerTest.*`) — all passed
   - [x] Regression test: `test_be_compaction_tasks` (system table)
   - [x] Regression test: `test_compaction_profile_action` (HTTP API)


-- 
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