This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 3f093627f2ab9527745d9a239bca545bc2425c1e Author: yuxuan-luo <[email protected]> AuthorDate: Fri Mar 22 15:53:52 2024 +0800 [fix](metrics) fix compaction_used_permits are negative numbers (#32440) Co-authored-by: hugoluo <[email protected]> --- be/src/olap/olap_server.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp index b190163c520..97ffc5bc11a 100644 --- a/be/src/olap/olap_server.cpp +++ b/be/src/olap/olap_server.cpp @@ -984,7 +984,7 @@ Status StorageEngine::_submit_compaction_task(TabletSharedPtr tablet, ? _cumu_compaction_thread_pool : _base_compaction_thread_pool; auto st = thread_pool->submit_func([tablet, compaction = std::move(compaction), - compaction_type, permits, is_low_priority_task, + compaction_type, permits, force, is_low_priority_task, this]() { if (is_low_priority_task && !_increase_low_priority_task_nums(tablet->data_dir())) { VLOG_DEBUG << "skip low priority compaction task for tablet: " @@ -996,11 +996,15 @@ Status StorageEngine::_submit_compaction_task(TabletSharedPtr tablet, _decrease_low_priority_task_nums(tablet->data_dir()); } } - _permit_limiter.release(permits); + if (!force) { + _permit_limiter.release(permits); + } _pop_tablet_from_submitted_compaction(tablet, compaction_type); }); if (!st.ok()) { - _permit_limiter.release(permits); + if (!force) { + _permit_limiter.release(permits); + } _pop_tablet_from_submitted_compaction(tablet, compaction_type); return Status::InternalError( "failed to submit compaction task to thread pool, " --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
