You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a9a6052
Browse filesBrowse the repository at this point in the historyBrowse files
fix: retry Thrift OpenSession and a 503-with-Retry-After ExecuteStatement
Thrift OpenSession was never retried, so a single 503, 429, 502, 504 or
408 failed the connection, and ExecuteStatement failed on a 503 with
Retry-After, which the server returns without running the statement.
The kernel backend retries both.
OpenSession joins the idempotent methods, HttpRetryPolicy retries 408,
and ExecuteStatement is also retried on a 503 with Retry-After. So that
a wrong host or an untrusted certificate on OpenSession isn't retried
for the whole budget and doesn't lose its cause, the shared classifier
no longer retries certificate verification failures or ENOTFOUND, as in
the kernel. After other network errors the retry-exhaustion message
names the error code, and a CloudFetch error thrown without retrying no
longer carries the presigned URL.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## Unreleased
4
4
5
+
- Thrift `OpenSession` is now retried like other idempotent requests: on transient HTTP errors (408, 429, 5xx except 501) and transient network errors such as a refused or reset connection. HTTP 408 is now retried on every idempotent request. Thrift `ExecuteStatement` is now also retried on HTTP 503 with a `Retry-After` header, which the server returns without running the statement; other HTTP errors on `ExecuteStatement` are still not retried. Server certificate verification failures and a host name that doesn't resolve (`ENOTFOUND`) are no longer retried by idempotent Thrift requests, CloudFetch downloads or the feature-flag fetch: the original error is thrown at once (for CloudFetch as `CloudFetch result download failed: network error <code>`, without the presigned URL). These retries use the existing `retryMaxAttempts` / `retriesTimeout` budget. **Behavior change:** when it runs out, these calls fail with `HiveDriverError` (`Hive driver: <status or network error code> when connecting to resource. Max retry count exceeded.` or `... Retry timeout exceeded.`) instead of the `THTTPException` or network error, so `statusCode` and the server's error detail are no longer on the error.
5
6
- The Thrift token federation exchange (`enableTokenFederation`) now goes through the connection's agent, so `proxy`, `checkServerCertificate`, `customCaCert` and `clientCert`/`clientKey` apply to it. Previously it connected directly with Node's default agent, so behind a required proxy the exchange failed and the driver fell back to the original token. (#611)
6
7
- Kernel backend: a failed status poll while waiting for a statement (a `runAsync: true` statement, or a default execution that outlives the server's inline wait) and a failed result fetch in `hasMoreRows()` now throw the mapped driver error, such as `HiveDriverError: HTTP 500: Internal Server Error` once retries on HTTP 5xx run out, instead of a raw `Error` whose message is the internal `__databricks_error__:{...}` envelope. As in `fetchChunk()`, a failed fetch in `hasMoreRows()` also closes the statement. (#608)
7
8
- Reduce result chunking and `fetchAll()` overhead for large query results.
0 commit comments