-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invalidate cached query results if query timed out (#22807)
Today we cache query results even if the query timed out. This is obviously problematic since results are not complete. Yet, the decision if a query timed out or not happens too late to simply not cache the result since if we'd just throw an exception all currently waiting requests with the same request / cache key would fail with the same exception without the option to access the result or to re-execute. Instead, this change will allow the request to enter the cache but invalidates it immediately. Concurrent request might not get executed and return the timed out result which is not absolutely correct but very likely since identical requests will likely timeout as well. As a side-effect we won't hammer the node with concurrent slow searches but rather only execute one of them and return shortly cached result. Closes #22789
- Loading branch information
Showing
3 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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