-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sqllab): Add threshold for checking inactive queries #24536
fix(sqllab): Add threshold for checking inactive queries #24536
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24536 +/- ##
==========================================
- Coverage 69.06% 68.93% -0.14%
==========================================
Files 1901 1903 +2
Lines 74019 74027 +8
Branches 8116 8118 +2
==========================================
- Hits 51121 51027 -94
- Misses 20787 20889 +102
Partials 2111 2111
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -201,8 +201,8 @@ export function estimateQueryCost(queryEditor) { | |||
}; | |||
} | |||
|
|||
export function clearInactiveQueries() { | |||
return { type: CLEAR_INACTIVE_QUERIES }; | |||
export function clearInactiveQueries(interval) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this function being called with an interval
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I pushed the missing part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SUMMARY
There's a issue that triggered preview query has gone occasionally. It is because the CLEAR_INACTIVE_QUERIES trigger in a 2s batch time but some queries can be added at the time to verify the inactive queries.
This commit adds the threshold to check the inactive queries to fix the problem.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After:
after--flushing-preview-queries.mov
Before:
before--flushing-preview-queries.mov
TESTING INSTRUCTIONS
Try to choose tables to make a preview query and open new tab for additional request for preview queries
ADDITIONAL INFORMATION