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` [](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](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) [](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: [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]
