@Override
    public Action handleAttemptFailure(Event event) {
      Throwable cause = event.getCause();
      if (cause == null
          || cause instanceof ReconfigurationInProgressException
          || cause instanceof TimeoutIOException
          || cause instanceof LeaderSteppingDownException
          || cause instanceof ServerNotReadyException
          || cause instanceof NotLeaderException) {
        return endlessPolicy.handleAttemptFailure(event);
      }

      return defaultPolicy.handleAttemptFailure(event);
    }
This policy is used to raft configuration change
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisClient.java