You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/20 23:09:08 UTC

[GitHub] [incubator-superset] betodealmeida opened a new pull request #7559: Fix for polling queries

betodealmeida opened a new pull request #7559: Fix for polling queries
URL: https://github.com/apache/incubator-superset/pull/7559
 
 
   ### CATEGORY
   
   Choose one
   
   - [X] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   https://github.com/apache/incubator-superset/pull/7446#pullrequestreview-238146228 changed the polling mechanism to keep polling when a query succeeds but doesn't have a `resultsKey`, to work around a race condition in SQL Lab. @graceguo-supercat pointed out that synchronous queries **do not** have `resultsKey`, and when they run the frontend keeps polling the backend unnecessarily.
   
   This PR changes the logic so that the frontend keeps polling only for async queries that succeeded but don't have `resultsKeys` set.
   
   <!-- ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF -->
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Without this PR, this happens:
   
   1. Run a sync query in SQL Lab, wait for results.
   2. Create new tab, run async query.
   3. Browser keeps polling after async query finished, since the sync query from (1) has no `resultsKey`.
   
   With this PR, the browser stops polling once the async query finishes.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] 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
   
   @graceguo-supercat 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org