public boolean isRetriable(Throwable exception) {
    while (exception != null
        && !(exception instanceof TemporaryFailureException)
        && !(exception instanceof TemporaryLockFailureException)
        && !(exception instanceof TimeoutException)) {
      exception = exception.getCause();
    }
    return exception != null;
  }
Check whether the exception is caused by one of the temporary failure exceptions, which are
likely to be retriable.
@param exception exception thrown by the table provider
@return true if we should retry, otherwise false
samza-kv-couchbase/src/main/java/org/apache/samza/table/remote/couchbase/BaseCouchbaseTableFunction.java