AbhishekPathania opened a new issue, #1502: URL: https://github.com/apache/arrow-java/issues/1502
### Describe the bug, including details regarding any error messages, version, and platform. `ArrowFlightSqlClientHandler#close` sends `CloseSession` only when the connection was opened with the `catalog` property. Otherwise it just closes the gRPC channel, and the server is never told that the session is over. Some Flight SQL servers create a session for every authenticated connection, without the client calling `SetSessionOptions`. Against such a server, every closed JDBC connection leaves its session open until it expires. With connection pools or frequent reconnects, this can use up the server's per-user session limit, after which new connections are rejected. I expected `Connection#close` to send `CloseSession` whether or not `catalog` is set. When no catalog was set, a failure (for example `UNIMPLEMENTED` from a server without session support) should not make `close` throw. ADBC's Flight SQL driver already does this: it always sends `CloseSession` on close and ignores an `UNIMPLEMENTED` reply ([flightsql_connection.go](https://github.com/apache/arrow-adbc/blob/45a17a0fa103368720eaa5cc658cc400d85d4d57/go/driver/flightsql/flightsql_connection.go#L1329)). Seen on 19.0.0 and on current main. -- 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]
