[client-v2] Abstract transport layer#2893
Conversation
|
Repository collaborators can run the JMH benchmark suite against this PR by commenting: Optional regression threshold override (Δ% on Time or Alloc/op; defaults to 10%): Only one benchmark run per PR is active at a time — issuing a new |
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
|
TriageCategory: Summary What this impacts
Concerns
Required reviewer action
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e1018a7. Configure here.
| @Override | ||
| public int getStatusCode() { | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
Status code always zero
Medium Severity
TransportResponseImpl.getStatusCode() always returns 0. This prevents consumers from accurately checking the HTTP status code, which can lead to misinterpreting server responses.
Reviewed by Cursor Bugbot for commit e1018a7. Configure here.
|
|
||
| } catch (Exception e) { | ||
| HttpAPIClientHelper.closeQuietly(httpResponse); | ||
| ClientUtils.quiteClose(transportResp, LOG); |
There was a problem hiding this comment.
Plain HTTP 503 no retry
Medium Severity
After the transport refactor, query and insert retry loops no longer treat HTTP 503 as retryable on their own. A 503 is turned into a ServerException with unknown ClickHouse code, shouldRetry returns false, and the client fails instead of picking another node like before.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit e1018a7. Configure here.





Summary
This PR creates boundary between
ClientandHttpAPIClientHelper:TransportRequestandTransportResponseobjects to hold all related context in one placeThis PR also removed some code duplication to reduce query/insert method logic. In the future it can be abstracted further.
PR does not change request logic mach but organizes code in different way.
Checklist
Delete items not relevant to your PR: