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

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


The following commit(s) were added to refs/heads/master by this push:
     new 245621ca3b [IOTDB-3032]Fix storage group cache (#5711)
245621ca3b is described below

commit 245621ca3bf6d822cad26ab857fb01578c920528
Author: xinzhongtianxia <[email protected]>
AuthorDate: Thu Apr 28 18:34:20 2022 +0800

    [IOTDB-3032]Fix storage group cache (#5711)
---
 .../iotdb/db/mpp/sql/analyze/ClusterPartitionFetcher.java      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/sql/analyze/ClusterPartitionFetcher.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/sql/analyze/ClusterPartitionFetcher.java
index 265941eb6e..f50812fc1d 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/sql/analyze/ClusterPartitionFetcher.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/sql/analyze/ClusterPartitionFetcher.java
@@ -421,14 +421,18 @@ public class ClusterPartitionFetcher implements 
IPartitionFetcher {
         return false;
       }
       for (String devicePath : devicePaths) {
+        boolean hit = false;
         for (String storageGroup : storageGroupCache) {
           if (devicePath.startsWith(storageGroup)) {
             deviceToStorageGroupMap.put(devicePath, storageGroup);
-          } else {
-            logger.debug("Failed to get storage group cache");
-            return false;
+            hit = true;
+            break;
           }
         }
+        if (!hit) {
+          logger.debug("{} cannot hit storage group cache", devicePath);
+          return false;
+        }
       }
       logger.debug("Hit storage group");
       return true;

Reply via email to