You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "NagaSurya11 (via GitHub)" <gi...@apache.org> on 2026/10/04 20:26:01 UTC

[I] csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s [arrow-adbc]

NagaSurya11 opened a new issue, #4851:
URL: https://github.com/apache/arrow-adbc/issues/4851

   ### What happened?
   
   The Spark driver defines `adbc.spark.connect_timeout_ms` (`SparkParameters.ConnectTimeoutMilliseconds`, added with the timeout options in #2312/#2313). It is only honored by the HTTP connection:
   
   - `SparkHttpConnection` parses it and sets `ConnectTimeoutMilliseconds` ([SparkHttpConnection.cs](https://github.com/apache/arrow-adbc/blob/3df4635caeeed89fa9c71d136278a0e540316a84/csharp/src/Drivers/Apache/Spark/SparkHttpConnection.cs)).
   - `SparkStandardConnection` (binary Thrift, `SparkServerType.Standard`) never reads the option. Its `ValidateOptions()` only handles the data type conversion and TLS options ([SparkStandardConnection.cs](https://github.com/apache/arrow-adbc/blob/3df4635caeeed89fa9c71d136278a0e540316a84/csharp/src/Drivers/Apache/Spark/SparkStandardConnection.cs)).
   
   `HiveServer2Connection.OpenAsync` uses `ConnectTimeoutMilliseconds` as the cancellation timeout for creating the transport/protocol and for `OpenSession` ([HiveServer2Connection.cs](https://github.com/apache/arrow-adbc/blob/3df4635caeeed89fa9c71d136278a0e540316a84/csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs)). Because the standard connection never overrides the property, it stays at the 30000 ms default no matter what the user sets. There is no error either: the option is silently ignored.
   
   Impact: servers that do real work while a session is opening, for example Apache Kyuubi launching a Spark engine on a cold start, can take longer than 30 s and the connection is cancelled.
   
   What I expected: `adbc.spark.connect_timeout_ms` behaves the same on both connection types (including `0` = no limit, and an `ArgumentOutOfRangeException` for invalid values).
   
   ### Stack Trace
   
   _No response_
   
   ### How can we reproduce the bug?
   
   1. Connect with the Spark driver over binary Thrift (not HTTP) to a server whose `OpenSession` takes longer than 30 s (e.g. Kyuubi with no running engine), with `adbc.spark.connect_timeout_ms=600000`.
   2. Expected: the session open may take up to 10 minutes. Per the code above, the 30 s default applies instead, because `SparkStandardConnection` never applies the option.
   3. The same option over the HTTP transport is honored.
   
   Fix: parse the option in `SparkStandardConnection.ValidateOptions()` the same way `SparkHttpConnection` does. A patch is ready (12 lines, builds with `dotnet build`) and I can open a PR.
   
   ### Environment/Setup
   
   C# Apache driver (csharp/src/Drivers/Apache/Spark) at apache/arrow-adbc main 3df4635ca. Seen through dbt-oss 2.0.5 (dbt Labs fork of the driver) against Apache Kyuubi, Linux. Source-checked against current apache/arrow-adbc main as well.


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s [arrow-adbc]

Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher commented on issue #4851:
URL: https://github.com/apache/arrow-adbc/issues/4851#issuecomment-5984681846

   (Also, I find it very unlikely that this code is being used by dbt. You probably want https://github.com/adbc-drivers/spark).


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s [arrow-adbc]

Posted by "CurtHagenlocher (via GitHub) via github" <gi...@arrow.apache.org>.
CurtHagenlocher commented on issue #4851:
URL: https://github.com/apache/arrow-adbc/issues/4851#issuecomment-6544249932

   Closed as per previous comments.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s [arrow-adbc]

Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher commented on issue #4851:
URL: https://github.com/apache/arrow-adbc/issues/4851#issuecomment-5984649416

   Thanks @NagaSurya11! Development of this code has moved to https://github.com/adbc-drivers/hiveserver2. Could you please open the issue there?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s [arrow-adbc]

Posted by "NagaSurya11 (via GitHub)" <gi...@apache.org>.
NagaSurya11 commented on issue #4851:
URL: https://github.com/apache/arrow-adbc/issues/4851#issuecomment-5984112238

   Patch (12 lines in `SparkStandardConnection.ValidateOptions()`, same parsing and error message as `SparkHttpConnection`): https://github.com/NagaSurya11/arrow-adbc/commit/4697cf385d9b93bcf82088eb371865fa411e4141
   
   `dotnet build` of `csharp/src/Drivers/Apache` succeeds with it; I have not added a unit test yet. Happy to open a PR (with a test) if this approach is acceptable.
   
   Context from the consumer side: dbt-labs/dbt#16592.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s [arrow-adbc]

Posted by "CurtHagenlocher (via GitHub) via issues" <is...@arrow.apache.org>.
CurtHagenlocher closed issue #4851: csharp/Spark: binary Thrift (SparkStandardConnection) ignores adbc.spark.connect_timeout_ms, so OpenSession is always capped at 30s
URL: https://github.com/apache/arrow-adbc/issues/4851


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org