OneSizeFitsQuorum commented on code in PR #13178:
URL: https://github.com/apache/iotdb/pull/13178#discussion_r1719692042
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisClient.java:
##########
@@ -167,4 +216,41 @@ public Action handleAttemptFailure(Event event) {
return defaultPolicy.handleAttemptFailure(event);
}
}
+
+ // This policy is used to raft configuration change
+ //
+ private static class RatisEndlessRetryPolicy implements RetryPolicy {
+
+ private static final Logger logger =
LoggerFactory.getLogger(RatisEndlessRetryPolicy.class);
+ private final RetryPolicy defaultPolicy;
+
+ RatisEndlessRetryPolicy() {
+ // about 1 hour wait Time.
+ defaultPolicy =
+ RetryPolicies.retryForeverWithSleep(TimeDuration.valueOf(2,
TimeUnit.SECONDS));
+ }
+
+ @Override
+ public Action handleAttemptFailure(Event event) {
+ if (event.getCause() instanceof ReconfigurationInProgressException) {
Review Comment:
Why not change this?
--
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]