-
Notifications
You must be signed in to change notification settings - Fork 336
Ensure correct query timeout value is used. #1417
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
Conversation
🦋 Changeset detectedLatest commit: e0f6446 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
E2E Test Results✅ All tests passed • 46 passed • 3 skipped • 262s
|
PR Review✅ No critical issues found. The fix correctly addresses the timeout unit mismatch:
The TODO comment about queryTimeout not being honored is accurate - this PR fixes the client-side abort timeout, but the comment suggests there may be additional investigation needed for server-side timeout enforcement. |
MikeShi42
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.
Unless I'm misunderstanding something, I actually think the original PR comment was a mistake - I was tracing the code and queryTimeout is indeed respected by the query generation, and we shouldn't need an additional abort controller (though maybe we want one anyways just in case?)
I checked locally and it seems like the setting is being set as well - are you observing the same?
| clickhouse_settings.max_execution_time = this.queryTimeout; |
Actually, I think you're correct! I didn't see that specific comment, just the PR.. I assumed there was another issue. I also verified the header is being sent in the request and see it passing through in the headers.
Let's double-check with @teeohhem before we merge, in case there is another case we should consider. |
|
Honestly it's on me for not leaving a comment there. I remember the tests failing and digging through the code to figure out that the abort wasn't ever happening. It could've been a lib version thing or it also could've been ignorance on my part. If we move forward with this, we'll just want to make sure that the timeout actually aborts when it's supposed to. |
| const queryTimeout = queryKey[2]; | ||
| const clickhouseClient = getClickhouseClient(); | ||
| // TODO: it seems like queryTimeout is not being used honored, we should fix this | ||
| const clickhouseClient = getClickhouseClient({ queryTimeout }); |
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.
I added this here, doesn't hurt to pass it


For example, it defaults to 60 seconds, but a timeout gets created for 60 milliseconds.
Before
After
Original PR:
#1072
Bug Introduced here:
#1132
Closes #1416
Fixes HDX-2931