Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private void handleException(@Nonnull Throwable ex) {
handler.onRetry(SessionRetryContext.this, ex, retry, next, ms());
scheduleNext(next);
} else {
handler.onError(SessionRetryContext.this, ex, maxRetries, ms());
handler.onLimit(SessionRetryContext.this, ex, maxRetries, ms());
promise.completeExceptionally(ex);
}
}
Expand Down
14 changes: 14 additions & 0 deletions table/src/main/java/tech/ydb/table/SessionRetryHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ default void onLimit(SessionRetryContext context, StatusCode code,
context.hashCode(), code, retryLimit, millis);
}

/**
* Called on retryable exception when the limit is reached.
*
* @param context Session retry object
* @param issue Retryable exception
* @param retryLimit Maximum number of retries
* @param millis Elapsed time
*/
default void onLimit(SessionRetryContext context, Throwable issue,
int retryLimit, long millis) {
LOGGER.debug("RetryCtx[{}] RETRYABLE ERROR[{}], finished by retries limit ({}), {} ms total",
context.hashCode(), errorMsg(issue), retryLimit, millis);
}

/**
* Called on non-retryable error.
*
Expand Down