Skip to content
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(hive): stop query on the processing engine when user clicks STOP on SQL Lab #18789

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

saurabh3091
Copy link
Contributor

@saurabh3091 saurabh3091 commented Feb 17, 2022

This addressed 18787
The issue concerns hive/spark-thriftserver as the processing engine.
When a user runs a query on SQL Lab and later for any reason wants to stop it, it doesn't stop it on the hive/spark query engine.

SUMMARY

While debugging we figured that the state updated at core.py is not reflected at the logic for canceling the job.

So we have added a small fix to update the session before it checks for the STOPPED status.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After
image

TESTING INSTRUCTIONS

  1. Run any query in SQL Lab with hive/spark-thriftserver as backend processing engine.
  2. Press STOP button on the UI.
  3. Check the query engine, the query will be stopped both on the frontend and backend.

ADDITIONAL INFORMATION

Fixes #18787

  • Has associated issue: 18787
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@saurabh3091 saurabh3091 changed the title stop query on the processing engine when user clicks STOP on SQL Lab fix: stop query on the processing engine when user clicks STOP on SQL Lab Feb 18, 2022
@nytai nytai changed the title fix: stop query on the processing engine when user clicks STOP on SQL Lab fix(hive): stop query on the processing engine when user clicks STOP on SQL Lab Feb 21, 2022
@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #18789 (5805fb3) into master (f5f25ff) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18789   +/-   ##
=======================================
  Coverage   66.32%   66.32%           
=======================================
  Files        1620     1620           
  Lines       63087    63088    +1     
  Branches     6372     6372           
=======================================
+ Hits        41840    41841    +1     
  Misses      19590    19590           
  Partials     1657     1657           
Flag Coverage Δ
hive 52.22% <100.00%> (+<0.01%) ⬆️
mysql 81.42% <0.00%> (-0.01%) ⬇️
postgres 81.47% <0.00%> (-0.01%) ⬇️
presto 52.06% <0.00%> (-0.01%) ⬇️
python 81.90% <100.00%> (+<0.01%) ⬆️
sqlite 81.16% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/db_engine_specs/hive.py 85.76% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5f25ff...5805fb3. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

@villebro villebro merged commit d632590 into apache:master Feb 22, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop button for queries doesn't work in SQL Lab.
3 participants