OneSizeFitsQuorum commented on code in PR #15075:
URL: https://github.com/apache/iotdb/pull/15075#discussion_r1992626274
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeReportableSubtask.java:
##########
@@ -151,7 +152,12 @@ private void onNonEnrichedEventFailure(final Throwable
throwable) {
throwable.getMessage(),
throwable);
try {
- Thread.sleep(Math.min(1000L * retryCount.get(), 10000));
+ long sleepInterval = Math.min(1000L * retryCount.get(), 10000);
+ // if receiver is read-only, connector will retry will power-increasing
interval
+ if (throwable instanceof
PipeConsensusRetryWithIncreasingIntervalException) {
+ sleepInterval = Math.min(1000L * retryCount.get() * retryCount.get(),
1000L * 120);
Review Comment:
1. Max 20s
2. Avoid negative after overflow
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeReportableSubtask.java:
##########
@@ -151,7 +152,12 @@ private void onNonEnrichedEventFailure(final Throwable
throwable) {
throwable.getMessage(),
throwable);
try {
- Thread.sleep(Math.min(1000L * retryCount.get(), 10000));
+ long sleepInterval = Math.min(1000L * retryCount.get(), 10000);
+ // if receiver is read-only, connector will retry will power-increasing
interval
Review Comment:
update comments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]