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

tanxinyu 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 b947dd83b6c Remove useless try-catch for RegionPriorityMap (#12389)
b947dd83b6c is described below

commit b947dd83b6c6e0eaf160e48623b8859e1cfb1f1a
Author: Yongzao <[email protected]>
AuthorDate: Tue Apr 23 11:45:02 2024 +0800

    Remove useless try-catch for RegionPriorityMap (#12389)
---
 .../manager/load/balancer/RouteBalancer.java       | 26 +++++++++-------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RouteBalancer.java
 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RouteBalancer.java
index 9516b2501b8..40e210c7f6f 100644
--- 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RouteBalancer.java
+++ 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/RouteBalancer.java
@@ -310,21 +310,17 @@ public class RouteBalancer implements 
IClusterStatusSubscriber {
         regionPriorityEntry : differentPriorityMap.entrySet()) {
       if (!Objects.equals(
           regionPriorityEntry.getValue().getRight(), 
regionPriorityEntry.getValue().getLeft())) {
-        try {
-          LOGGER.info(
-              "[RegionPriority]\t {}: {}->{}",
-              regionPriorityEntry.getKey(),
-              regionPriorityEntry.getValue().getLeft() == null
-                  ? "null"
-                  : 
regionPriorityEntry.getValue().getLeft().getDataNodeLocations().stream()
-                      .map(TDataNodeLocation::getDataNodeId)
-                      .collect(Collectors.toList()),
-              
regionPriorityEntry.getValue().getRight().getDataNodeLocations().stream()
-                  .map(TDataNodeLocation::getDataNodeId)
-                  .collect(Collectors.toList()));
-        } catch (Exception e) {
-          LOGGER.error("Unexpected exception", e);
-        }
+        LOGGER.info(
+            "[RegionPriority]\t {}: {}->{}",
+            regionPriorityEntry.getKey(),
+            regionPriorityEntry.getValue().getLeft() == null
+                ? "null"
+                : 
regionPriorityEntry.getValue().getLeft().getDataNodeLocations().stream()
+                    .map(TDataNodeLocation::getDataNodeId)
+                    .collect(Collectors.toList()),
+            
regionPriorityEntry.getValue().getRight().getDataNodeLocations().stream()
+                .map(TDataNodeLocation::getDataNodeId)
+                .collect(Collectors.toList()));
       }
     }
   }

Reply via email to