-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix testDirectTrinoClientLongQuery #27488
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
base: master
Are you sure you want to change the base?
Conversation
05ca898 to
f33c296
Compare
Thanks for doing that! I understand this refers to #26371 where the test was added that PR desc:
this PR desc
This test uses |
|
Polling pages is non-blocking (if there are no pages, trino/core/trino-main/src/main/java/io/trino/client/direct/DirectTrinoClient.java Line 112 in f1cdafa
The timings I attached mainly reflect deserialization: trino/core/trino-main/src/main/java/io/trino/client/direct/DirectTrinoClient.java Line 113 in f1cdafa
My understanding is that if no new page is available, The timeout is set to a very low value (1s), which is fine for tests, but in production it should be higher (the default is 5 minutes) to avoid getting close to the deserialization time. |
lukasz-stec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. As an alternative, we could increase both timeouts, but that would make the test run longer, so this seems better.
| public void testDirectTrinoClientLongQuery() | ||
| { | ||
| queryRunner.execute(TEST_SESSION, "SELECT * FROM blackhole.test_schema.slow_test_table"); | ||
| queryRunner.execute(TEST_SESSION, "EXPLAIN ANALYZE SELECT * FROM blackhole.test_schema.slow_test_table"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would SELECT count(*) FROM blackhole.test_schema.slow_test_table have the same effect?
f33c296 to
5437a88
Compare
|
@findepi I applied what we discussed offline. The test didn’t fail locally after running it in a loop for an hour - previously it would fail sporadically. |
Record heartbeats more frequently to prevent query timeouts during large result sets or when the query state changes more often than the heartbeat interval.
5437a88 to
b826007
Compare
Description
Attempt to fix #27082.
Record heartbeats more frequently to prevent query timeouts during large
result sets or when the query state changes more often than the heartbeat
interval.
Additional context and related issues
Release notes
(x) 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.
( ) Release notes are required, with the following suggested text: