From 5e27cf55d6ca7d5a38c27ed4ad03a9665acaa154 Mon Sep 17 00:00:00 2001 From: zhiqiang-hhhh Date: Fri, 27 Dec 2024 17:27:45 +0800 Subject: [PATCH] NED --- be/src/util/threadpool.cpp | 3 +++ .../test_metrics_with_workload_group.groovy | 3 +++ 2 files changed, 6 insertions(+) diff --git a/be/src/util/threadpool.cpp b/be/src/util/threadpool.cpp index 0025963ad2dedef..f97270e1941ec9a 100644 --- a/be/src/util/threadpool.cpp +++ b/be/src/util/threadpool.cpp @@ -272,6 +272,8 @@ ThreadPool::~ThreadPool() { // There should only be one live token: the one used in tokenless submission. CHECK_EQ(1, _tokens.size()) << strings::Substitute( "Threadpool $0 destroyed with $1 allocated tokens", _name, _tokens.size()); + // FOR DEBU, need remove + std::cerr << "Threadpool " << _name << " deconstruct " << std::endl; shutdown(); } @@ -327,6 +329,7 @@ Status ThreadPool::init() { } void ThreadPool::shutdown() { + std::cerr << "Threadpool " << _name << " shutdonw. " << std::endl; DorisMetrics::instance()->metric_registry()->deregister_entity(_metric_entity); debug::ScopedTSANIgnoreReadsAndWrites ignore_tsan; std::unique_lock l(_lock); diff --git a/regression-test/suites/workload_manager_p0/test_metrics_with_workload_group.groovy b/regression-test/suites/workload_manager_p0/test_metrics_with_workload_group.groovy index b8c8686163970ad..8c91f7f3e52ceb2 100644 --- a/regression-test/suites/workload_manager_p0/test_metrics_with_workload_group.groovy +++ b/regression-test/suites/workload_manager_p0/test_metrics_with_workload_group.groovy @@ -68,5 +68,8 @@ suite("test_metrics_with_workload_group") { List lines = filteredMetrics.split('\n').findAll { it.trim() } assert lines.size() == 5 } + + sql "drop workload group if exists test_wg_metrics;" } + sql "drop workload group if exists test_wg_metrics;" } \ No newline at end of file