HyukjinKwon opened a new pull request, #917:
URL: https://github.com/apache/spark-connect-rust/pull/917
### What changes were proposed in this pull request?
A follow-up of SPARK-62198 (#916), with two changes.
**`close()` ends the client's calls in flight.** In PySpark, closing the
channel cancels every call of the client in flight, and the drop-in now does
the same.
- A call before its response fails CANCELLED `Channel closed!`.
- A stream being read fails CANCELLED `Stream removed (Channel closed!)`.
- No response is read after the close, so no `release_until` is sent after
it.
Before, a call in flight waited for the server's next response, or for its
timeout. The calls go through the client's checked channel, which now races
each call with the close.
**A failure during another failure's conversion.** A call that fails while
another failure of the same client is converted raises its error as grpc gives
it, as PySpark's `_handle_error` does (`inside_error_handling`).
- An example is a call of a log handler at `Received ErrorInfo`.
- Its error is not converted: there are no records, and no FetchErrorDetails
or stack-trace Config requests.
- A call on another session's client is still converted, as in PySpark.
- The same guard applies in the Rust API, where such an error is the plain
status error.
The KD and compat rows of `inside_error_handling`, the context of a failed
call, and the close are updated.
### Why are the changes needed?
To close the two differences that the final review of SPARK-62198 found.
### Does this PR introduce _any_ user-facing change?
Yes, as above.
### How was this patch tested?
- New golden cases, captured with official PySpark 4.3.0 under protobuf 7
and 6:
- three of the close: during a read, before the first response, and during
a config read;
- two of a failing call of a log handler during a conversion.
- New core tests (`deadlines.rs` and a unit test of the conversion guard),
each failing without its fix.
- Probes of both clients against the mock server.
- The core tests (release and debug), clippy, rustdoc, the tooling tests,
the offline suite under coverage, and the e2e with and without protobuf.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code
This pull request and its description were written by Isaac.
--
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]