Skip to content

Reduce db queries in /queries/ endpoint#7498

Merged
graceguo-supercat merged 1 commit into
apache:masterfrom
graceguo-supercat:gg-Revert#4833
May 24, 2019
Merged

Reduce db queries in /queries/ endpoint#7498
graceguo-supercat merged 1 commit into
apache:masterfrom
graceguo-supercat:gg-Revert#4833

Conversation

@graceguo-supercat
Copy link
Copy Markdown

@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
Copy Markdown

codecov-io commented May 24, 2019

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.20%. Comparing base (265e117) to head (70c0868).
⚠️ Report is 15087 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7498      +/-   ##
==========================================
- Coverage   65.20%   65.20%   -0.01%     
==========================================
  Files         435      435              
  Lines       21486    21477       -9     
  Branches     2378     2378              
==========================================
- Hits        14011    14005       -6     
+ Misses       7355     7352       -3     
  Partials      120      120              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 First shipped in 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)
@sadpandajoe sadpandajoe added #bug Bug report and removed !deprecated-label:bug Deprecated label - Use #bug instead labels Mar 18, 2026
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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 #bug Bug report size/M 🚢 0.34.0 First shipped in 0.34.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants