Repository navigation
docs(gtf): document GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL cache floor - #43846
Conversation
Address review feedback on apache#43407: the operator docs did not mention the async result-cache TTL floor. Add an "Async Query Result Cache TTL" section to the caching docs explaining why the floor exists (an async chart-data request caches its result and the client re-reads it, so a TTL shorter than the round trip could evict the result before it is fetched, hanging the chart), how it interacts with the chart/dataset/database timeout chain (async-only, raises only shorter TTLs, leaves 0 untouched), and how to tune GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTL along with its retention/Redis-usage trade-off.
|
Bito Automatic Review Skipped - Branch Excluded |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| 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 |
There was a problem hiding this 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
Prompt for AI Agent 🤖
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|
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 |
SUMMARY
Addresses review feedback on #43407 (discussion): 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.mdxcovering:/chart/datarequest 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.0("cache forever") untouched.GLOBAL_ASYNC_QUERIES_MIN_CACHE_TTLand 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-flagsanchor resolves.ADDITIONAL INFORMATION