[sql lab] Fix setting async query status to timed_out #7429
+5
−7
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.
CATEGORY
Choose one
SUMMARY
In #4833, we tried to introduce a feature that setting old async query status to be
timed_out
, when the query status stuck at pending or running without updates after 6 hours. This status will help front-end (browser) not fetching very old query status. The bug i found is backend didn't commit transaction, so there is no records in query table has statustimed_out
(but keeps in running status for very very long time).BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
When user's query has no updates after 6 hours, front-end should show this error message:

TEST PLAN
send async query, then check query table. We should see old queries status that were
running
orpending
, should updated to betimed_out
.ADDITIONAL INFORMATION
REVIEWERS
@john-bodley @michellethomas @timifasubaa @mistercrunch