OpenSearch/core
Simon Willnauer a475323aa1 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
2017-01-26 16:45:29 +01:00
..
licenses Upgrade to Lucene 6.4.0 (#22724) 2017-01-21 04:48:01 +01:00
src Invalidate cached query results if query timed out (#22807) 2017-01-26 16:45:29 +01:00
build.gradle Settings: Add infrastructure for elasticsearch keystore 2016-12-22 16:28:34 -08:00