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

justinchen pushed a commit to branch connection-retry
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/connection-retry by this push:
     new fa43a638ec8 fix
fa43a638ec8 is described below

commit fa43a638ec8fd04333a8f2da27b2e6f95ae2dee3
Author: Caideyipi <[email protected]>
AuthorDate: Thu Feb 5 16:56:13 2026 +0800

    fix
---
 .../pipe/agent/task/subtask/PipeAbstractSinkSubtask.java     | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java
 
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java
index 760d3c2ffeb..a5de833a14f 100644
--- 
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java
+++ 
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java
@@ -159,8 +159,7 @@ public abstract class PipeAbstractSinkSubtask extends 
PipeReportableSubtask {
         throwable);
 
     int retry = 0;
-    while (retry < MAX_RETRY_TIMES
-        || 
PipeConfig.getInstance().isPipeSinkRetryLocallyForConnectionError()) {
+    while (retry < MAX_RETRY_TIMES) {
       try {
         outputPipeSink.handshake();
         LOGGER.info(
@@ -171,16 +170,13 @@ public abstract class PipeAbstractSinkSubtask extends 
PipeReportableSubtask {
         retry++;
         LOGGER.warn(
             "{} failed to handshake with the target system for {} times, "
-                + 
(PipeConfig.getInstance().isPipeSinkRetryLocallyForConnectionError()
-                    ? "will retry forever."
-                    : String.format("will retry at most %s times.", 
MAX_RETRY_TIMES)),
+                + "will retry at most {} times.",
             outputPipeSink.getClass().getName(),
             retry,
+            MAX_RETRY_TIMES,
             e);
         try {
-          sleepIfNoHighPriorityTask(
-              Math.min(retry, MAX_RETRY_TIMES)
-                  * PipeConfig.getInstance().getPipeSinkRetryIntervalMs());
+          sleepIfNoHighPriorityTask(retry * 
PipeConfig.getInstance().getPipeSinkRetryIntervalMs());
         } catch (final InterruptedException interruptedException) {
           LOGGER.info(
               "Interrupted while sleeping, will retry to handshake with the 
target system.",

Reply via email to