You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2023/11/17 02:12:34 UTC

(iotdb) branch iot_retry created (now f72423cb4d2)

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

tanxinyu pushed a change to branch iot_retry
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at f72423cb4d2 fix

This branch includes the following new commits:

     new f72423cb4d2 fix

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb) 01/01: fix

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f72423cb4d22a6fa49fecff41f1ea3806989488a
Author: OneSizeFitQuorum <ta...@apache.org>
AuthorDate: Fri Nov 17 10:12:18 2023 +0800

    fix
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
 .../java/org/apache/iotdb/consensus/iot/client/DispatchLogHandler.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/DispatchLogHandler.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/DispatchLogHandler.java
index a10d031e91f..93d63ea6389 100644
--- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/DispatchLogHandler.java
+++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/DispatchLogHandler.java
@@ -54,7 +54,7 @@ public class DispatchLogHandler implements AsyncMethodCallback<TSyncLogEntriesRe
 
   @Override
   public void onComplete(TSyncLogEntriesRes response) {
-    if (response.getStatuses().size() == 1 && needRetry(response.getStatuses().get(0).getCode())) {
+    if (response.getStatuses().stream().anyMatch(status -> needRetry(status.getCode()))) {
       logger.warn(
           "Can not send {} to peer {} for {} times because {}",
           batch,