You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/02/19 14:50:01 UTC
[doris] 06/30: [fix](metric) Fix be core when set enable_system_metrics to false in be (#16646)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 9b12f1fb50f8d10bdc3813c6137f8fd2b6ab7c98
Author: caiconghui <55...@users.noreply.github.com>
AuthorDate: Sun Feb 12 23:01:41 2023 +0800
[fix](metric) Fix be core when set enable_system_metrics to false in be (#16646)
when enable_system_metrics is false, we should not use system_metrics any more
Co-authored-by: caiconghui1 <ca...@jd.com>
---
be/src/common/configbase.cpp | 5 ++---
be/src/common/daemon.cpp | 4 +++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/be/src/common/configbase.cpp b/be/src/common/configbase.cpp
index bbce71e15f..8f9ca0e6ac 100644
--- a/be/src/common/configbase.cpp
+++ b/be/src/common/configbase.cpp
@@ -439,9 +439,8 @@ Status set_fuzzy_config(const std::string& field, const std::string& value) {
void set_fuzzy_configs() {
// random value true or false
- Status s =
- set_fuzzy_config("disable_storage_page_cache", ((rand() % 2) == 0) ? "true" : "false");
- LOG(INFO) << s.to_string();
+ set_fuzzy_config("disable_storage_page_cache", ((rand() % 2) == 0) ? "true" : "false");
+ set_fuzzy_config("enable_system_metrics", ((rand() % 2) == 0) ? "true" : "false");
// random value from 8 to 48
// s = set_fuzzy_config("doris_scanner_thread_pool_thread_num", std::to_string((rand() % 41) + 8));
// LOG(INFO) << s.to_string();
diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp
index b80787cb4e..a1a98f11b2 100644
--- a/be/src/common/daemon.cpp
+++ b/be/src/common/daemon.cpp
@@ -218,7 +218,9 @@ void Daemon::memory_maintenance_thread() {
// Refresh allocator memory metrics.
#if !defined(ADDRESS_SANITIZER) && !defined(LEAK_SANITIZER) && !defined(THREAD_SANITIZER)
doris::MemInfo::refresh_allocator_mem();
- DorisMetrics::instance()->system_metrics()->update_allocator_metrics();
+ if (config::enable_system_metrics) {
+ DorisMetrics::instance()->system_metrics()->update_allocator_metrics();
+ }
#endif
doris::MemInfo::refresh_proc_mem_no_allocator_cache();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org