This is an automated email from the ASF dual-hosted git repository.
cambyzju pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new bb50ce193f2 [fix](metrics) fix compaction_used_permits are negative
numbers #32440 (#42526)
bb50ce193f2 is described below
commit bb50ce193f2c0974f36067de79cbffc2c1e19369
Author: camby <[email protected]>
AuthorDate: Tue Oct 29 10:59:16 2024 +0800
[fix](metrics) fix compaction_used_permits are negative numbers #32440
(#42526)
---
be/src/olap/olap_server.cpp | 18 +++++++++++-------
be/src/olap/task/engine_storage_migration_task.h | 3 +--
be/src/runtime/fragment_mgr.cpp | 2 +-
be/src/runtime/runtime_state.h | 1 -
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index 3455fb267fd..5b89bdd3b1e 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 f25fecbd178..7f0ab051ca6 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 <stdint.h>
-
#include <gen_cpp/olap_file.pb.h>
+#include <stdint.h>
#include <mutex>
#include <shared_mutex>
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index 303ba449325..f9051610dbf 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 d63dfc4d732..970a28d22ea 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -450,7 +450,6 @@ public:
: 0;
}
-
bool is_nereids() const;
private:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]