-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Fix race condition when fetching results in SQL Lab #7198
Conversation
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.
yes!!!!!
Codecov Report
@@ Coverage Diff @@
## lyftga #7198 +/- ##
==========================================
- Coverage 64.52% 64.51% -0.01%
==========================================
Files 424 424
Lines 20684 20682 -2
Branches 2268 2268
==========================================
- Hits 13346 13344 -2
Misses 7216 7216
Partials 122 122
Continue to review full report at Codecov.
|
* Fix race condition when fetching results in SQL Lab * Fix lint
* Fix race condition when fetching results in SQL Lab * Fix lint (cherry picked from commit ca6a73b)
SUMMARY
There's a race condition causing results to not be returned by SQL Lab. An eager
commit
saves the query object with its status set toSUCCESS
, but only later it updates theresultsKey
:I simply deleted the first commit, and now the results are always returned.
I also fixed the
execute_sql_statement
function. It was taking an argumentreturn_results
which was not being used anywhere.TEST PLAN
I ran queries in SQL Lab, and they returned 100% of the time. Before, occasionally they wouldn't return anything because
state
was set toSUCCESS
, but the query object had noresultsKeys
attribute.ADDITIONAL INFORMATION
REVIEWERS
@xtinec @DiggidyDave @khtruong @enricoberti