Prior to this PR, when the security-crypto threadpool queue overflows and rejects API key hashing submissions, a toxic value (specifically, a future which will never be completed) is added to the API key auth cache. This toxic cache value causes future authentication attempts with that API key to fail by timeout, because they will attempt to wait for the toxic future, until that value is invalidated and removed from the cache. Additionally, this will hold on to memory for each request that waits on the toxic future, even after the request has timed out.
This PR adds a unit test to replicate this case, and adjusts the code which submits the key hashing task to the security-crypto threadpool to properly handle this point of failure by invalidating the cached future and notifying waiting handlers that the computation has failed.
* [DOCS] Clarify copy_to behavior with strict dynamic mappings
* Add id
* De-verbosify
* Delete pesky comma
* More info about root and nest
* Fixes per review, clarify non-recursive explanation
* Skip tests for illustrative example
* Fix example syntax
* Fix typo
* Ensure vector similarity correctly limits inner_hits returned for nested kNN (#111363)
For nested kNN we support not only similarity thresholds, but also
multi-passage search while retrieving more than one nearest passage.
However, the inner_hits retrieved for the kNN search would ignore the
restricted similarity. Meaning, the inner hits would return all
passages, not just the ones within the limited similarity and this is
confusing.
closes: https://github.com/elastic/elasticsearch/issues/111093
(cherry picked from commit 69c96974de)
* fixing for backport
* adj for backport
* fix compilation for tests
indices.query.bool.max_clause_count is set automatically and does
not default to 4096 as before. This remove mentions of 4096
from query documentations.
Relates to PR#91811
* Replace model_id with inference_id in inference API except when storing ModelConfigs
* Update docs/changelog/111366.yaml
* replace missed literals in tests
Make it clear that this API should be used only if the detailed shard
info is needed and only on ongoing snapshots. Remove incorrectly
mentioned `STATE` value.
adding text to match the positioning that Shay asked for on https://www.elastic.co/elasticsearch
(cherry picked from commit 66218164a0)
Co-authored-by: Serena Chou <serenachou@users.noreply.github.com>
Fix bugs caused by pushing down Eval, Grok, Dissect and Enrich past Rename, where after the pushdown, the columns added shadowed the columns to be renamed.
For Dissect and Grok, this enables naming their generated attributes to deviate from the names obtained from the dissect/grok patterns.
(cherry picked from commit e8a01bbd9c)
# Conflicts:
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/OptimizerRules.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Dissect.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Enrich.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Eval.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/RegexExtract.java
This is an attempt to fix occasional test failures where asserting on a
request response fails because the cluster has not finished
initialization and cannot yet serve requests.
Closes#109660
* Allow runtime java to match adoptium jdks (#111117)
* Use bundled jdk version for immutable collections patch (#111162)
Co-authored-by: Ryan Ernst <ryan@iernst.net>
Clarify that the default config is the recommended one, and that users
should not normally enable `DEBUG` or `TRACE` logging without looking at
the source code. Also reorders the information a bit for easier reading.