gardenia commented on PR #18903:
URL: https://github.com/apache/iceberg/pull/18903#issuecomment-6915939218

   Thanks @developer-rpai , good catches.
   
   1. Agreed. `ConnectTimeoutException` is a `SocketTimeoutException`, so it 
was being reported as unknown. One correction: in HttpClient 5.6 waiting for a 
pooled connection throws `ConnectionRequestTimeoutException` (an 
`InterruptedIOException`), not `ConnectTimeoutException`. Both are now treated 
as never sent, along with `UnknownHostException`, `NoRouteToHostException` and 
`SSLHandshakeException`. I kept the default as unknown rather than flipping to 
an allow-list of after-send failures. Missing a pre-send case only reports a 
harmless failure as unknown, which can leave orphan files. Missing a post-send 
case (a reset, a broken pipe, a TLS error mid-stream, a proxy closing the 
connection) would bring this bug back. The pre-send list is the shorter and 
better-defined one.
   2. Added to the description.
   3. Done: `testCommitThatWasNeverSentIsNotCommitStateUnknown` is 
parameterized over all six, and `testLostCommitResponseIsCommitStateUnknown` 
over a read timeout, no response and a connection reset. The pre-send test 
calls `commitRequest` directly, because `Tasks` treats a 
`ConnectionRequestTimeoutException` as an interruption and sets the caller's 
interrupt flag. That's existing behaviour, noted in the description.
   4. Strictly, the two HttpClient 5 checks belong in `HTTPClient`, so that 
each `RESTClient` implementation can decide this for itself. That felt like too 
wide a change for this fix, so I've left them in `RESTTableOperations`. Other 
clients never throw those two types, so the checks are simply never triggered 
for them, and their connect timeouts fall back to the safe default of unknown. 
Happy to move them if you'd prefer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to