fix: prevent race condition when canceling query#11449
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11449 +/- ##
==========================================
- Coverage 62.26% 61.57% -0.70%
==========================================
Files 863 417 -446
Lines 40978 25960 -15018
Branches 3693 0 -3693
==========================================
- Hits 25516 15984 -9532
+ Misses 15283 9976 -5307
+ Partials 179 0 -179
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Member
|
another rebase should fix the broken E2E test. |
Member
Author
|
Thanks, @rusackas! |
john-bodley
approved these changes
Oct 29, 2020
Member
john-bodley
left a comment
There was a problem hiding this comment.
@betodealmeida sorry I don't recall anything beyond the comments in the original PR. Given that there is a similar check elsewhere and this seems to mitigate the problem the change LGTM.
Member
Author
|
Thanks, @john-bodley! |
auxten
pushed a commit
to auxten/incubator-superset
that referenced
this pull request
Nov 20, 2020
qfcwell
pushed a commit
to qfcwell/superset
that referenced
this pull request
May 12, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
With the right timing, it's possible to cancel a query, see the message and toast saying "Query was stopped", but still have results being loaded in SQL Lab shortly after. I added a check to prevent this from happening.
Note that
actions.QUERY_FAILEDhas a similar check.I also noticed that this has been fixed in the past (#2164), but removed later (#4833). @graceguo-supercat and @john-bodley do you have context why it was removed? It doesn't seem obvious to me from the PR.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
The problem is hard to repro because of the sensitive timing, but I was able to make it happen twice by changing the examples database to async and canceling running queries at the right time.
After the fix was applied I wasn't able to repro the problem.
ADDITIONAL INFORMATION