You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JDBC] Connection#close does not close the server session unless a catalog is set #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).
Activity
apacheGH-1502: [JDBC] Do not close the session from getStreams endpoi…
apacheGH-1502: [JDBC] Close the server session on Connection#close wi…
apacheGH-1502: [JDBC] Do not close the session from getStreams endpoi…
apacheGH-1502: [JDBC] Close the server session on Connection#close wi…
apacheGH-1502: [JDBC] Do not close the session from getStreams endpoi…
apacheGH-1502: [JDBC] Close the server session on Connection#close wi…
apacheGH-1502: [JDBC] Do not close the session from getStreams endpoi…
apacheGH-1502: [JDBC] Only ignore no-session statuses from CloseSessi…