Skip to content

Commit 2b5cc5d

Browse files
Add comments
1 parent 1038508 commit 2b5cc5d

File tree

1 file changed

+4
-1
lines changed
  • databricks-sdk-java/src/main/java/com/databricks/sdk/core

1 file changed

+4
-1
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ private Response executeInner(Request in, String path, RequestOptions options) {
256256
databricksError = ApiErrors.getDatabricksError(response);
257257
} catch (IOException e) {
258258
LOG.debug("Request {} failed", in, e);
259+
// TODO: This is necesarry for backward compatibility as the code used
260+
// to allow retries on IO errors. However, it is not clear if this is
261+
// something we should continue to support.
259262
databricksError = new DatabricksError("IO_ERROR", 523, e);
260263
response = null;
261264
}
@@ -269,7 +272,7 @@ private Response executeInner(Request in, String path, RequestOptions options) {
269272
}
270273

271274
// Retry after a backoff.
272-
long sleepMillis = response != null ? getBackoffMillis(response, attemptNumber) : 1000;
275+
long sleepMillis = getBackoffMillis(response, attemptNumber);
273276
LOG.debug(
274277
String.format("Retry %s in %dms", in.getRequestLine(), sleepMillis), databricksError);
275278
try {

0 commit comments

Comments
 (0)