Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current implementation of compaction task submission reserves permits before task execution, which can lead to inefficient resource utilization. Tasks waiting in the thread pool queue may hold permits, potentially blocking other tasks from being executed. ## Solution Modify the `_submit_compaction_task` method to request permits only when the compaction task is actually about to be executed, rather than at the time of submission to the thread pool. ## Changes - Moved permit request from task submission to task execution stage - Ensures permits are only held during actual task processing - Maintains the original blocking behavior for permit acquisition - Improves overall resource utilization across different compaction thread pools ## Benefits - More efficient use of system resources - Prevents tasks from blocking permits while waiting in the queue - Preserves the existing task scheduling logic - No additional complexity in error handling
- Loading branch information