Hyukjin Kwon created SPARK-61355:
------------------------------------

             Summary: Retry the requests that a connection closed before 
sending them, as PySpark does
                 Key: SPARK-61355
                 URL: https://issues.apache.org/jira/browse/SPARK-61355
             Project: Spark
          Issue Type: Bug
          Components: Connect
    Affects Versions: connect-rust-4.3.0
            Reporter: Hyukjin Kwon


After a connection reset, a request that the Rust client had queued on the 
HTTP/2 connection but not sent yet failed with CANCELLED "operation was 
canceled". hyper cancels such a request when its connection closes, tonic 
reports hyper's canceled error as CANCELLED, and RetryPolicy::can_retry does 
not retry CANCELLED. For example, 
collect_reattaches_after_three_connection_resets in e2e_reattach_drop.rs failed 
at its collect in 1 of 40 runs with 2 test threads. In PySpark 4.3.0, 
grpc-python fails a call whose connection breaks with UNAVAILABLE, which 
DefaultPolicy retries; such a request was never sent, so sending it again is 
safe.
The fix retries a CANCELLED whose source is hyper's canceled error, which hyper 
raises only for a request that its connection closed before sending. A 
CANCELLED that the server sent, which has no source, and tonic's timeout of a 
request, which is CANCELLED too, are still not retried.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to