fix(query-orchestrator): Return result when refreshKey changes during…#10445
Draft
fix(query-orchestrator): Return result when refreshKey changes during…#10445
Conversation
… query execution When `must-revalidate` cache mode is used and the refreshKey changes faster than the query executes, queries could enter an endless loop. This fix: 1. Splits the cache renewal condition into "expired" vs "key mismatch but not expired" — user requests with a key mismatch on non-expired cache now return the cached result immediately with a background refresh instead of blocking. 2. Prevents pre-aggregation rebuilds when the existing build is recent (within refreshKeyRenewalThreshold) and the structure version hasn't changed. 3. Adds skipRefreshKeyWaitForRenew to the must-revalidate path to avoid blocking on refresh key re-evaluation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10445 +/- ##
===========================================
- Coverage 83.37% 57.51% -25.86%
===========================================
Files 250 222 -28
Lines 74886 17399 -57487
Branches 0 3567 +3567
===========================================
- Hits 62434 10007 -52427
+ Misses 12452 6856 -5596
- Partials 0 536 +536
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… query execution
When
must-revalidatecache mode is used and the refreshKey changes faster than the query executes, queries could enter an endless loop. This fix: