feat: Add connection-level query timeout support#5
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Query Timeout Support via
x-query-timeout-msgRPC HeaderThis change adds support for propagating query timeouts to the IOMETE Flight SQL server using a custom
x-query-timeout-msgRPC header. When a timeout is configured, the header is attached to every query execution request, allowing the server to enforce it server-side.Statement-level timeout
Use the standard JDBC API on any
StatementorPreparedStatement:The header
x-query-timeout-ms: 30000will be sent with the request. A value of0means no timeout (default).Connection-level (global) timeout
Set a default timeout for all queries on a connection via the JDBC URL or
Properties:All statements on this connection will include
x-query-timeout-ms: 60000unless overridden at the statement level.Precedence
Statement-level timeout takes priority over the connection-level default. If
setQueryTimeout(0)is called on a statement, it falls back to the connection-level value. If neither is set, no header is sent.stmt.setQueryTimeout(30)x-query-timeout-ms: 30000?queryTimeout=60(no statement timeout)x-query-timeout-ms: 60000stmt.setQueryTimeout(30)+?queryTimeout=60x-query-timeout-ms: 30000