You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2023/05/16 03:13:51 UTC

[iotdb] branch handle_redirection_during_dispatching updated: purge log

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

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


The following commit(s) were added to refs/heads/handle_redirection_during_dispatching by this push:
     new 005fd7fc5e purge log
005fd7fc5e is described below

commit 005fd7fc5e06018c2138e818385f8eb0e4aecfea
Author: Tian Jiang <jt...@163.com>
AuthorDate: Tue May 16 11:16:44 2023 +0800

    purge log
---
 .../main/java/org/apache/iotdb/commons/partition/StorageExecutor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java b/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
index d6af675d5d..e3f49f31da 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/partition/StorageExecutor.java
@@ -93,7 +93,7 @@ public class StorageExecutor implements ExecutorType {
       }
     }
 
-    if (i < dataNodeLocations.size()) {
+    if (i < dataNodeLocations.size() && regionReplicaSet.getPreferredLocation() != i) {
       regionReplicaSet.setPreferredLocation(i);
       logger.info("Preferred location of {} has been set to {}", regionReplicaSet,
           regionReplicaSet.getDataNodeLocations().get(i));