Commit 3cae948
authored
Fix chunk download failures mis-bucketed as CONNECTION_ERROR in telemetry (#1469)
## Summary
The 5-arg `DatabricksSQLException(reason, cause, statementId,
chunkIndex, sqlState)` constructor — used exclusively by
`ChunkDownloadTask` — hardcoded `CONNECTION_ERROR.name()` in its
`exportFailureLog` call, ignoring the `sqlState` argument passed in by
the caller.
`ChunkDownloadTask.java:98` passes `CHUNK_DOWNLOAD_ERROR.name()` as
`sqlState`, so chunk download failures were:
- stored on the `SQLException` with sqlState `CHUNK_DOWNLOAD_ERROR`
(visible to JDBC consumers), but
- recorded in telemetry under the `CONNECTION_ERROR` bucket.
This divergence was flagged by a pre-existing `// TODO : Check chunk
retry telemetry logic` comment.
The fix passes the caller's `sqlState` through to `exportFailureLog`, so
the telemetry `errorName` matches the SQLException's sqlState and the
caller's intent.
## Test plan
- [ ] `mvn test -pl . -Dtest=ChunkDownloadTaskTest`
- [ ] `mvn test -pl . -Dtest=DatabricksSQLExceptionTest`
- [ ] Confirm telemetry dashboards bucket chunk download failures under
`CHUNK_DOWNLOAD_ERROR` going forward (was `CONNECTION_ERROR`).
NO_CHANGELOG=true
This pull request and its description were written by Isaac.
Signed-off-by: samikshya-chand_data <samikshya.chand@databricks.com>1 parent 927496d commit 3cae948
1 file changed
Lines changed: 3 additions & 3 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments