private boolean isSaslError(IOException e) {
      Throwable cause = e;
      while (true) {
        if (cause instanceof IOException) {
          IOException unwrappedCause = unwrapException((IOException) cause);
          if (
            unwrappedCause instanceof SaslException
              || (unwrappedCause.getMessage() != null && unwrappedCause.getMessage()
                .contains(RpcConnectionConstants.RELOGIN_IS_IN_PROGRESS))
          ) {
            return true;
          }
        }
        cause = cause.getCause();
        if (cause == null) {
          return false;
        }
      }
    }
The category of exceptions where we can ensure that the request has not yet been received
and/or processed by the target regionserver yet and hence we can determine whether it is safe
to choose different regionserver as the target.
@param e IOException thrown by the underlying rpc framework.
@return true if the exception belongs to the category where the regionserver has not yet
        received the request yet.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RSProcedureDispatcher.java