pan3793 commented on code in PR #53260:
URL: https://github.com/apache/spark/pull/53260#discussion_r2579362651
##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectStatement.scala:
##########
@@ -35,14 +35,21 @@ class SparkConnectStatement(conn: SparkConnectConnection)
extends Statement {
override def close(): Unit = synchronized {
if (!closed) {
if (operationId != null) {
- conn.spark.interruptOperation(operationId)
+ try {
+ conn.spark.interruptOperation(operationId)
+ } catch {
+ case _: java.net.ConnectException =>
+ // Ignore ConnectExceptions during cleanup as the operation may
have already completed
+ // or the server may be unavailable. The important part is marking
this statement
+ // as closed to prevent further use.
Review Comment:
`closed = true` is an undoubtedly fix, and thanks for clarifying your view
on swallowing the exception, it's fine then.
that makes sense, thanks for the clarification, I will continue to audit and
improve that during the RC phase.
> I don't consider new JDBC module itself as a blocker for Apache Spark
4.1.0. This JDBC module itself is new and still experimental in 4.1.0.
Generally, we stabilize new module via multiple subsequent feature and
maintenance releases
--
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]