diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp index 3455fb267fd13b..5b89bdd3b1e997 100644 --- a/be/src/olap/olap_server.cpp +++ b/be/src/olap/olap_server.cpp @@ -994,14 +994,18 @@ Status StorageEngine::_submit_compaction_task(TabletSharedPtr tablet, (compaction_type == CompactionType::CUMULATIVE_COMPACTION) ? _cumu_compaction_thread_pool : _base_compaction_thread_pool; - auto st = thread_pool->submit_func( - [tablet, compaction = std::move(compaction), compaction_type, permits, this]() { - tablet->execute_compaction(*compaction); - _permit_limiter.release(permits); - _pop_tablet_from_submitted_compaction(tablet, compaction_type); - }); + auto st = thread_pool->submit_func([tablet, compaction = std::move(compaction), + compaction_type, permits, force, this]() { + tablet->execute_compaction(*compaction); + 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, " diff --git a/be/src/olap/task/engine_storage_migration_task.h b/be/src/olap/task/engine_storage_migration_task.h index f25fecbd17861c..7f0ab051ca6c21 100644 --- a/be/src/olap/task/engine_storage_migration_task.h +++ b/be/src/olap/task/engine_storage_migration_task.h @@ -18,9 +18,8 @@ #ifndef DORIS_BE_SRC_OLAP_TASK_ENGINE_STORAGE_MIGRATION_TASK_H #define DORIS_BE_SRC_OLAP_TASK_ENGINE_STORAGE_MIGRATION_TASK_H -#include - #include +#include #include #include diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp index 303ba44932539a..f9051610dbf146 100644 --- a/be/src/runtime/fragment_mgr.cpp +++ b/be/src/runtime/fragment_mgr.cpp @@ -681,7 +681,7 @@ Status FragmentMgr::_get_query_ctx(const Params& params, TUniqueId query_id, boo // This may be a first fragment request of the query. // Create the query fragments context. query_ctx = QueryContext::create_shared(params.fragment_num_on_host, _exec_env, - params.query_options,params.is_nereids); + params.query_options, params.is_nereids); query_ctx->query_id = query_id; RETURN_IF_ERROR(DescriptorTbl::create(&(query_ctx->obj_pool), params.desc_tbl, &(query_ctx->desc_tbl))); diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h index d63dfc4d732a1e..970a28d22ea0be 100644 --- a/be/src/runtime/runtime_state.h +++ b/be/src/runtime/runtime_state.h @@ -450,7 +450,6 @@ class RuntimeState { : 0; } - bool is_nereids() const; private: