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

feat: add configuration for Presto cursor poll interval #10191

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Jun 29, 2020

SUMMARY

Uses the poll interval defined in the database's connect_args (if there) to set the polling interval for Presto's cursor. This will align the polling between Superset and PyHive, hopefully resulting in less downtime on shorter/synchronous queries (if the admin chooses)

TEST PLAN

CI, unfortunately this is pretty hard to write a unit test for :/

ADDITIONAL INFORMATION

  • Has associated issue: Fixes Speed up presto queries! #10139
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

to: @john-bodley @villebro @bkyryliuk @tooptoop4

@@ -729,6 +732,11 @@ def get_create_view(
def handle_cursor(cls, cursor: Any, query: Query, session: Session) -> None:
"""Updates progress information"""
query_id = query.id
poll_interval = (
query.database.get_extra()
Copy link
Member

Choose a reason for hiding this comment

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

it would be nice to add a property connect_args to the db object as this code becomes a bit repetitive:
https://github.com/apache/incubator-superset/search?q=connect_args&unscoped_q=connect_args

and by the way connect args should be part of the engine_params

@etr2460 etr2460 force-pushed the erik-ritter--presto-poll-config branch from c4aa6d1 to 547b1c7 Compare June 30, 2020 00:24
@etr2460 etr2460 merged commit b686004 into apache:master Jun 30, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Mar 12, 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/S 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speed up presto queries!
3 participants