nytai commented on issue #29515:
URL: https://github.com/apache/superset/issues/29515#issuecomment-2214840181

   >To support automatic cancellation of queries, we add a new optional field 
poll_ttl to the query context, which makes it possible to automatically cancel 
queries that are not being actively polled. Every time the cache key is polled, 
the latest poll time is updated on the metadata object. While executing, the 
worker periodically checks the metadata object, and if the poll_ttl is defined, 
and if the last poll time exceeds the TTL, the query is cancelled. This ensures 
that if a person closes a dashboard with lots of long running queries, the 
queries are automatically cancelled if nobody is actively waiting for the 
results. By default, frontend requests have poll_ttl set to whichever value is 
set in the config (DEFAULT_CHART_DATA_POLL_TTL). Cache warmup requests would 
likely not have a poll_ttl set, so as to avoid unnecessary polling.
   
   I'd suggest making this configurable or to respect the "cancel queries on 
window onload event" that exists in the db connection settings. Some workflows 
involve dashboard being accessed multiple times a day, so there is some benefit 
to running and caching the queries even though there isn't someone actively 
waiting for them. Thinking of a case where someone opens a dashboard, it takes 
too long to load so they pack up and commute to the office, and open up the 
dashboard once they're at their desk. 


-- 
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]

Reply via email to