This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 0080815d11e [cherry-pick](branch-2.1)fix be metric 
doris_be_process_thread_num is zero (#36719)
0080815d11e is described below

commit 0080815d11ea871f366099679351867b1cd41754
Author: Xujian Duan <50550370+darvend...@users.noreply.github.com>
AuthorDate: Tue Jul 16 10:43:06 2024 +0800

    [cherry-pick](branch-2.1)fix be metric doris_be_process_thread_num is zero 
(#36719)
    
    ## Proposed changes
    
    Issue Number: close #xxx
    
    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 f0518f4e71c..6e1485a81b7 100644
--- a/be/src/util/doris_metrics.cpp
+++ b/be/src/util/doris_metrics.cpp
@@ -325,7 +325,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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to