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

Reduce db queries in /queries/ endpoint #7498

Merged
merged 1 commit into from
May 24, 2019

Conversation

graceguo-supercat
Copy link

@graceguo-supercat graceguo-supercat commented May 13, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

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 after 6 hours. This status update will help front-end (browser) not fetching very old query status. But i found that backend actually didn't commit transaction, so the whole query/update logic seems no use.

In #7429 I was trying to fix this issue by adding db commit. But I also found in front-end javascript, we have logic that don't poll query status after SQLLAB_ASYNC_TIME_LIMIT_SEC reached. I feel the additional query/update in backend every second, seems expensive and not necessary. So I propose to remove this query/update logic from every polling request.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

n/a

TEST PLAN

CI and watch query polling.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@john-bodley @timifasubaa @mistercrunch @michellethomas

@john-bodley john-bodley added the !deprecated-label:bug Deprecated label - Use #bug instead label May 23, 2019
@codecov-io
Copy link

codecov-io commented May 24, 2019

Codecov Report

Merging #7498 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #7498      +/-   ##
=========================================
- Coverage    65.2%   65.2%   -0.01%     
=========================================
  Files         435     435              
  Lines       21486   21477       -9     
  Branches     2378    2378              
=========================================
- Hits        14011   14005       -6     
+ Misses       7355    7352       -3     
  Partials      120     120
Impacted Files Coverage Δ
superset/views/core.py 72.98% <100%> (+0.03%) ⬆️

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 265e117...70c0868. Read the comment docs.

@graceguo-supercat graceguo-supercat merged commit 2014329 into apache:master May 24, 2019
john-bodley pushed a commit that referenced this pull request May 24, 2019
(cherry picked from commit 2014329)
@graceguo-supercat graceguo-supercat deleted the gg-Revert#4833 branch May 28, 2019 17:24
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 31, 2019
(cherry picked from commit 2014329)
michellethomas pushed a commit that referenced this pull request Jun 1, 2019
(cherry picked from commit 2014329)
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
(cherry picked from commit 03cae41)
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
(cherry picked from commit 2014329)
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 !deprecated-label:bug Deprecated label - Use #bug instead size/M 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants