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

haonan 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 b0c421983a5 Enhance IoTConsensus retry judgement to all writenodes in 
a batch (#11564)
b0c421983a5 is described below

commit b0c421983a50733ca560e485af8e3ff87901a044
Author: Potato <[email protected]>
AuthorDate: Fri Nov 17 15:50:49 2023 +0800

    Enhance IoTConsensus retry judgement to all writenodes in a batch (#11564)
    
    Signed-off-by: OneSizeFitQuorum <[email protected]>
---
 .../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,

Reply via email to