Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timeout for the backend stats collection query #583

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willmostly
Copy link
Contributor

Add a timeout for the backend stats collection query.

Default the stats collection query to use EXECUTE IMMEDIATE by default, with the option to use explicit PREPARE if desired

Description

The stats collection query uses the traditional PREPARE/EXECUTE sequence to collect stats on the number of queued and running queries. There is a 10 second timeout on the PREPARE, however there is no timeout on the EXECUTE phase. This can cause issues on clusters that may be able to process the PREPARE quickly, but not the EXECUTE. This is configured as a Duration:

monitorConfiguration:
   queryTimeout: "10s"

In addition, the default mode has been updated to use EXECUTE IMMEDIATE to skip the prepare step. This has been available since 431. If needed to support earlier versions of Trino, explicit PREPARE can be enabled by setting:

monitorConfiguration:
   explicitPrepare: True

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text:

* Configure query timeout and use EXECUTE IMMEDIATE for backend stats collection

@cla-bot cla-bot bot added the cla-signed label Jan 2, 2025
@willmostly willmostly force-pushed the will/jdbc-stats-timeout branch from b005207 to 4d3a8a4 Compare January 2, 2025 16:49
Default the stats collection query to use EXECUTE IMMEDIATE by default, with the option to use explicit PREPARE if desired
@willmostly willmostly force-pushed the will/jdbc-stats-timeout branch from 4d3a8a4 to 69d1e4d Compare January 7, 2025 14:49
@willmostly willmostly requested a review from oneonestar January 7, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants