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
Summary
Forward-ports the v0.9.9 patch (PR #3073) to main, which was flagged in #3136 as never having landed there. Two related fixes for #2637: (1) in client-v2, server error 159 TIMEOUT_EXCEEDED is removed from the retryable set and exposed as ServerException.EXECUTION_TIMEOUT, so execution timeouts are no longer silently retried; (2) in jdbc-v2, Statement.setQueryTimeout() — previously a no-op because the client runs synchronously by default — now sets the server-side max_execution_time setting when async operations are disabled, and timeout failures surface as SQLTimeoutException instead of a generic SQLException. ConnectionImpl additionally applies DEFAULT_QUERY_SETTINGS driver properties and clickhouse_setting_-prefixed client properties to connection-level default query settings, and DatabaseMetaDataImpl gains Paimon/Remote/QueryRunner engine→table-type mappings. Substantial integration test coverage is added for the timeout paths.
What this impacts
client-v2 retry policy: error 159 is now non-retriable (behavioral change for any consumer relying on the old retry behavior).
jdbc-v2 Statement#setQueryTimeout semantics: now propagates to server max_execution_time in sync mode; timeouts throw SQLTimeoutException (subclass of SQLException, so JDBC-compatible but observably different).
jdbc-v2 connection init: server-setting properties now flow into default query settings.
jdbc-v2 DatabaseMetaData table-type classification for new engines.
Concerns
Medium rule fired: behavioral changes in hot-path modules (client-v2 retry semantics, jdbc-v2 statement execution path) and an effective default-settings propagation change in ConnectionImpl.
Mild bundling/intent drift: the DatabaseMetaDataImpl engine-map additions (Paimon, Remote, QueryRunner) are unrelated to the linked timeout issues; acceptable as part of a patch-branch port but worth a glance.
New integration tests assert elapsed time within ±1s of the timeout on a heavy query — likely flaky on loaded CI runners.
throwOnExecutionTimeout computes shouldThrow from TimeoutException but line ordering means a ServerException check overwrites logic readability; reviewer should verify the null/cause handling.
Required checks were still in progress at triage time (not counted toward risk).
The reason will be displayed to describe this comment to others. Learn more.
Timeout test can pass silently
Medium Severity
testExecutionTimeout only asserts inside catch (ServerException). If the query finishes without a timeout, or the failure is wrapped (for example ExecutionException), the test still passes and never checks EXECUTION_TIMEOUT or that code 159 is not retried.
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
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.
Summary
Closes: #2637
Closes: #3136
Closes: #2826
Checklist
Delete items not relevant to your PR: