@Override
  protected Throwable preProcessError(Throwable error) {
    if (
      error instanceof DoNotRetryIOException
        && error.getCause() instanceof UnsupportedOperationException
    ) {
      // fallback to use replay, and also return the cause to let the upper retry
      useReplay = true;
      return error.getCause();
    }
    return error;
  }
For replicating edits to secondary replicas.
hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionReplicationRetryingCaller.java