fix(client-v2): classify insert write failures as transfer errors#2923
Merged
chernser merged 1 commit intoJul 13, 2026
Merged
Conversation
Stop wrapping IOExceptions from the POJO insert write path as DataSerializationException so request-body transport failures keep their network classification. Add regression coverage for both the broken-pipe write failure case and a real POJO getter failure to preserve the serialization error path. Update the changelog for issue ClickHouse#2729.
|
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 |
Contributor
|
@014-code Thank you for the contribution! |
chernser
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2729
This PR fixes exception classification for POJO inserts in
client-v2.Previously,
Client.insert(...)could wrap request-body write failures such asjava.net.SocketException: Broken pipe (Write failed)intoDataSerializationExceptionwhile serializing POJOs. That made transport failureslook like serialization bugs.
This change stops catching
IOExceptioninside the POJO field serialization loop,so write-time network failures continue through the transport error path and are
reported as
DataTransferExceptioninstead.Actual POJO reflection/serialization failures are unchanged and still surface as
DataSerializationException.Compatibility impact:
This is a bug fix with no public API signature change. The only user-visible behavior
change is the exception type reported for request-body transport failures during
Client.insert(...).Tests:
DataSerializationExceptionfor real getter failuresLocal verification:
mvn -pl client-v2 -am -DskipITs=true -Dtest=InsertExceptionClassificationTest -Dsurefire.failIfNoSpecifiedTests=false testChecklist