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

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b7560b902c [fix](cloud) Fix rlock recursion in CloudSystemInfoService 
(#37647)
6b7560b902c is described below

commit 6b7560b902c86c0e502c4de2bfcf9eb9a045a9e6
Author: deardeng <565620...@qq.com>
AuthorDate: Sat Jul 13 22:02:42 2024 +0800

    [fix](cloud) Fix rlock recursion in CloudSystemInfoService (#37647)
---
 .../apache/doris/cloud/system/CloudSystemInfoService.java    | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
index e6f92b9cc36..bf6ed760874 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
@@ -450,7 +450,7 @@ public class CloudSystemInfoService extends 
SystemInfoService {
                 LOG.warn("cant find clusterId by clusteName {}", clusterName);
                 return "";
             }
-            return getCloudStatusById(clusterId);
+            return getCloudStatusByIdNoLock(clusterId);
         } finally {
             rlock.unlock();
         }
@@ -459,14 +459,18 @@ public class CloudSystemInfoService extends 
SystemInfoService {
     public String getCloudStatusById(final String clusterId) {
         rlock.lock();
         try {
-            return clusterIdToBackend.getOrDefault(clusterId, new 
ArrayList<>())
-                .stream().map(Backend::getCloudClusterStatus).findFirst()
-                .orElse(String.valueOf(Cloud.ClusterStatus.UNKNOWN));
+            return getCloudStatusByIdNoLock(clusterId);
         } finally {
             rlock.unlock();
         }
     }
 
+    public String getCloudStatusByIdNoLock(final String clusterId) {
+        return clusterIdToBackend.getOrDefault(clusterId, new ArrayList<>())
+            .stream().map(Backend::getCloudClusterStatus).findFirst()
+            .orElse(String.valueOf(Cloud.ClusterStatus.UNKNOWN));
+    }
+
     public void updateClusterNameToId(final String newName,
                                       final String originalName, final String 
clusterId) {
         wlock.lock();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to