You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2026/09/04 01:43:10 UTC

[PR] docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor [superset]

villebro opened a new pull request, #43846:
URL: https://github.com/apache/superset/pull/43846

   ### SUMMARY
   
   Addresses review feedback on #43407 ([discussion](https://github.com/apache/superset/pull/43407#discussion_r3930062725)): enabling Global Async Queries floors async chart-result cache TTLs (default 5 min), which can override a shorter operator retention policy and increase Redis usage, but the operator docs didn't mention or explain how to tune it.
   
   Adds an **"Async Query Result Cache TTL"** section to `docs/admin_docs/configuration/cache.mdx` covering:
   
   - **Why the floor exists (motivation):** an async `/chart/data` request runs on a background task that writes the result to the data cache, and the browser then re-issues the request to read it back. If the effective TTL is shorter than the async round trip (task execution + poll interval + re-fetch), the entry can be evicted before the client reads it, leaving the chart stuck re-running.
   - **How it interacts with the existing timeout chain:** async-only (sync requests unaffected even with GAQ on), raises only TTLs shorter than the floor, and leaves `0` ("cache forever") untouched.
   - **How to tune `GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL`** and the retention / Redis-usage trade-off (don't lower it below your worst-case async round trip).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Docs-only. Preview: the new section renders under Configuration โ†’ Caching, after "Chart Cache Timeout".
   
   ### TESTING INSTRUCTIONS
   
   Docs-only change; no code paths affected. Verify the section renders in the docs preview and the `#feature-flags` anchor resolves.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43846:
URL: https://github.com/apache/superset/pull/43846#issuecomment-5534516983

   <!-- Bito Reply -->
   The suggestion is correct. The TTL for the async result cache begins when the worker writes the result to the cache, not when the task starts. Therefore, including the task execution time in the TTL requirement is unnecessary and overstates the required retention period. 
   
   To resolve this, you should update the documentation to clarify that the TTL requirement is based on the time from result write to client retrieval, rather than the total round-trip time including execution. 
   
   Would you like me to implement this fix in the documentation and check the other comments on this PR?
   
   **docs/admin_docs/configuration/cache.mdx**
   ```
   This read-back is what makes the result-cache TTL matter for correctness, not just performance: if
   the effective TTL is shorter than the time from result write to client retrieval, the entry can be
   **evicted before the client reads it**, leaving the chart stuck re-running instead of loading.
   ```


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor [superset]

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #43846:
URL: https://github.com/apache/superset/pull/43846


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43846:
URL: https://github.com/apache/superset/pull/43846#issuecomment-5534493849

   ### <span aria-hidden="true">โœ…</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">๐Ÿ”จ</span> Latest commit | e2ec9401027a522cf671cc8c9c94a180e4996847 |
   |<span aria-hidden="true">๐Ÿ”</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a9a222f5f3ba10008c92a80 |
   |<span aria-hidden="true">๐Ÿ˜Ž</span> Deploy Preview | [https://deploy-preview-43846--superset-docs-preview.netlify.app](https://deploy-preview-43846--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">๐Ÿ“ฑ</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQzODQ2LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.RNnghsdB43sy-wyuwrlU2zPJ5xHViR4HFOnCw0PXq2o)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">๐Ÿค–</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcrLDYAgDADQXXq2CWI04AaOUQuICT-RizHuLrd3eC-UmmNpsAIMsFdK7LtN5hsPujCeCZnYW2wt9GFsCfnZTD8LaZJSutlNO41CCMVakhLw_Q) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-43846--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #43846:
URL: https://github.com/apache/superset/pull/43846#discussion_r3930192464


##########
docs/admin_docs/configuration/cache.mdx:
##########
@@ -97,6 +97,37 @@ This setting only applies to requests detected as native filter option queries.
 over the per-chart/dataset/database timeouts, but not over an explicit per-request
 `custom_cache_timeout` override (e.g. "Force refresh").
 
+## Async Query Result Cache TTL
+
+When [Global Async Queries](/admin-docs/configuration/configuring-superset#feature-flags) is
+enabled, a chart-data request that runs asynchronously does not return the result inline. Instead the
+query executes on a background task that **writes the result to the data cache**, and the browser
+then re-issues the same request to read that result back out of the cache once the task succeeds.
+
+This read-back is what makes the result-cache TTL matter for correctness, not just performance: if
+the effective TTL is shorter than the full async round trip (task execution + the client's poll
+interval + the re-fetch), the entry can be **evicted before the client reads it**, leaving the chart
+stuck re-running instead of loading. To prevent this, async requests floor their result-cache TTL to

Review Comment:
   **Suggestion:** The TTL starts when the worker writes the result, so task execution time does not consume it; including execution in the TTL requirement overstates needed retention. [logic error]
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Sometimes`
   
   [![Use CodeAnt Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=8fa87b0ee18a452c8c237866903969bc&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=8fa87b0ee18a452c8c237866903969bc&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** docs/admin_docs/configuration/cache.mdx
   **Line:** 107:110
   **Comment:**
   	*Logic Error: The TTL starts when the worker writes the result, so task execution time does not consume it; including execution in the TTL requirement overstates needed retention.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43846&comment_hash=5d2d4d9e67ac121864523d4bf3b4cf256f09ce7db28bf7659daee6f7c424a5c4&reaction=like'>๐Ÿ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43846&comment_hash=5d2d4d9e67ac121864523d4bf3b4cf256f09ce7db28bf7659daee6f7c424a5c4&reaction=dislike'>๐Ÿ‘Ž</a>



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43846:
URL: https://github.com/apache/superset/pull/43846#issuecomment-5534479644

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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