koszti opened a new pull request #15403: URL: https://github.com/apache/superset/pull/15403
### SUMMARY This is addressing #15402 SQL Lab has Stop button but it only updates state of superset without actually stopping the database query. Leaving the queries running in the background affect database performance. This PR is to stop running queries in the backend databases when * Stop button pressed in SQL Lab * Navigated to a new site, refreshed or closed the SQLLab browser window It currently supports mysql, postgres and snowflake databases but new database support can be added easily. This is a refactored and extended version of the unmerged and inactive https://github.com/apache/superset/pull/7611 ### TESTING INSTRUCTIONS 1. Run a long running query in one of the supported drivers. For example MySQL: `SELECT sleep(60)` 2. Press the Stop button, close the tab or navigate to another Superset page 3. Running query should get killed automatically in the backend database. For example MySQL `SHOW PROCESSLIST` should not show the query from point 1) ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] 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 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
