Skip to content

Commit

Permalink
FIX EXIT CORE
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiang-hhhh committed Dec 25, 2024
1 parent ad26051 commit e82bc25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions be/src/util/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ void MetricEntity::trigger_hook_unlocked(bool force) const {
}
}

MetricRegistry::~MetricRegistry() {}
MetricRegistry::~MetricRegistry() {
LOG_INFO("MetricRegistry is destroyed.");
}

std::shared_ptr<MetricEntity> MetricRegistry::register_entity(const std::string& name,
const Labels& labels,
Expand Down Expand Up @@ -323,12 +325,12 @@ void MetricRegistry::trigger_all_hooks(bool force) const {
std::string MetricRegistry::to_prometheus(bool with_tablet_metrics) const {
// Reorder by MetricPrototype
EntityMetricsByType entity_metrics_by_types;
std::lock_guard<std::mutex> l(_lock);
std::lock_guard<std::mutex> l1(_lock);
for (const auto& entity : _entities) {
if (entity.first->_type == MetricEntityType::kTablet && !with_tablet_metrics) {
continue;
}
std::lock_guard<std::mutex> l(entity.first->_lock);
std::lock_guard<std::mutex> l2(entity.first->_lock);
entity.first->trigger_hook_unlocked(false);
for (const auto& metric : entity.first->_metrics) {
std::pair<MetricEntity*, Metric*> new_elem =
Expand Down
1 change: 0 additions & 1 deletion be/src/util/threadpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ 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());
shutdown();
}

Status ThreadPool::init() {
Expand Down

0 comments on commit e82bc25

Please sign in to comment.