This is an automated email from the ASF dual-hosted git repository.
yangbowen 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 e9f604e8001 [cherry-pick](branch-2.0) fix be metric
doris_be_process_thread_num is zero (#36718)
e9f604e8001 is described below
commit e9f604e8001010ea1f6b8bf120bef5aaf4af9169
Author: Xujian Duan <[email protected]>
AuthorDate: Tue Jul 9 14:29:32 2024 +0800
[cherry-pick](branch-2.0) fix be metric doris_be_process_thread_num is zero
(#36718)
## Proposed changes
cherry-pick #35511
<!--Describe your changes.-->
---
be/src/util/doris_metrics.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/util/doris_metrics.cpp b/be/src/util/doris_metrics.cpp
index 21264ed2fa2..668fb9017aa 100644
--- a/be/src/util/doris_metrics.cpp
+++ b/be/src/util/doris_metrics.cpp
@@ -354,7 +354,7 @@ void DorisMetrics::_update_process_thread_num() {
int64_t count =
std::count_if(dict_iter, std::filesystem::end(dict_iter), [](const
auto& entry) {
std::error_code error_code;
- return entry.is_regular_file(error_code) && !error_code;
+ return entry.is_directory(error_code) && !error_code;
});
process_thread_num->set_value(count);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]