The tests depend on the SlowLog loggers running at TRACE level
but were not setting the level themselves. Instead they relied
on the SlowLog setting the level to trace internally when it
was created. If something else globally adjusted log levels
between the time the SlowLog loggers were created and the tests
ran, the tests could fail.
And in fact, `ScopedSettingsTest.testFallbackToLoggerLevel` was
updating the root log level, which had the side effect of updating
the SlowLog level. In #112183 SlowLog's log initialization was made
static, which opened up its test to failure when ScopedSettingsTest
ran before a SlowLog test in the same JVM.
I do not know if the intention of the SlowLog is that it overrides
the global log level and should always be set at TRACE, in which case
this fix is incorrect. It seems surprising, but I don't know why else
SlowLog would explicitly initialize itself to TRACE. However, if that
was the intention, the code was already at risk due to having no
guard against being changed by Loggers.setLevel on an ancestor log.
The change in this PR is at least not a regression in that
behaviour. It does no longer start out at TRACE however, which is
a change in behaviour.
Today we show `Metadata#clusterUUID` in the response to `GET /`
regardless of whether this value is committed or not, which means that
in theory users may see this value change even if nothing is going
wrong. To avoid any doubt about the stability of this cluster UUID, this
commit suppresses the cluster UUID in this API response until it is
committed.
SpanTermQueryBuilder currently creates a valid SpanTermQuery against unmapped fields.
In practice, if the field is unmapped, there won't be a match. This commit changes
the toQuery impl to return a MatchNoDocsQuery instead like we do in similar scenarios.
* Adding chunking settings to MistralService, GoogleAiStudioService, and HuggingFaceService (#113623)
* Adding chunking settings to MistralService, GoogleAiStudioService, and HuggingFaceService
* Update docs/changelog/113623.yaml
* Removing chunking settings from HuggingFaceElser model inputs
* Removing unnecessary platfromArchitectures from InferenceService tests (#113890)
* Removing unnecessary platfromArchitectures from InferenceService tests
* Update docs/changelog/113890.yaml
* Delete docs/changelog/113890.yaml
* Fix HuggingFaceMixedIT test sometimes failing when run on version before 8.16 (#114061)
* Fix HuggingFaceMixedIT test sometimes failing when run on version before 8.16
* Fixing typo in expected error message
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fast refresh indices should now behave like non fast refresh indices in
how they execute (m)gets and searches. I.e., they should use the search
shards.
For BWC, we define a new transport version. We expect search shards to
be upgraded first, before promotable shards. Until the cluster is fully
upgraded, the promotable shards (whether upgraded or not) will still
receive and execute gets/searches locally.
Relates ES-9573
Relates ES-9579
A recent commit incidentally changed a release resources call from
doBefore to doAfter. Several tests depending on resources being released
synchronously which requires doBefore.
Closes#114181Closes#114182
It is possible in the incremental high watermark test that the data is
submitted causing a corruption of the bulk request. This commit fixes
the issue to ensure we only send new data after it has been requested.
Additionally, it adds an assertion to prevent this error from happening
again.
Currently we have a relatively basic decider about when to throttling
indexing. This commit adds two levels of watermarks with configurable
bulk size deciders. Additionally, adds additional settings to control
primary, coordinating, and replica rejection limits.
* Assert that REST params are consumed iff supported (#114040)
REST APIs which declare their supported parameters must consume exactly
those parameters: consuming an unsupported parameter means that requests
including that parameter will be rejected, whereas failing to consume a
supported parameter means that this parameter has no effect and should
be removed.
This commit adds an assertion to verify that we are consuming the
correct parameters.
Closes#113854
* CI poke
Deeply nested array elements with ignored source need to use the second
parsing pass, to avoid missing the source from siblings that go through
stored source.
(cherry picked from commit 5531e5dcd2)
This commit the work started in #108767 to other security config, adding additional protections to the other on-disk files used by the Security module. With this change, non-Security modules will be prevented from accessing Security's on-disk configuration files.
(cherry picked from commit 8fed8e63b0)
This PR tracks the total number of query and fetch failures, in addition
to the existing metrics for each shard, and exposes them through the
stats API.
Enables end-to-end streaming for OpenAI's chat completion API.
Additional changes: - InferenceServiceResults now returns a wildcard,
allowing for tests to work with classes that extend ChunkedToXContent. -
StreamingChatCompletionResults now defines the Results structure so that
future providers can reuse the same structure. - DelegatingProcessor now
cancels the upstream if `next` throws an exception and forwards the
exception downstream. - Moved the streaming handler from
OpenAiChatCompletionResponseHandler to OpenAiResponseHandler so that
Azure Open AI can reuse it. - OpenAiStreamingProcessor now iterates over
the returned choices array, handling both OpenAI and Azure response
formats. - SenderService declares a helper `Set<TaskType>` for
implementations to reuse when enabling streaming. - Added an
InferenceEventsAssertion test helper to fluidly assert responses from
the mock webserver.
* [ML] Move code specific to the Elasticsearch in cluster services to those sevices (#113749)
Remove the platform arch argument from parseRequest and move code
used by internal services out of the transport action into the service.
# Conflicts:
# muted-tests.yml
* Bugfix by moving onResponse call into the new action listener; also add new test to catch this bug (#113898)
---------
Co-authored-by: Max Hniebergall <137079448+maxhniebergall@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add CircuitBreaker to TDigest, Step 4: Take into account shallow classes size (#113613)
* Removed muted tests from merge conflict
* Added missing empty line in muted tests
It's possible to call `RecoveryTarget#restoreFileFromSnapshot` after the
`RecoveryTarget` has been replaced with a new instance due to a retry,
but before all its refs have been released. If the recovery was
snapshot-based then in this situation we will have already transferred
the permits to the new instance, so the assertion that this instance has
permits will trip. This commit fixes the problem with a non-null
placeholder value indicating that the recovery target was at least
originally created while holding some snapshot recovery permits.
Closes#96018
This param is a no-op for all production callers but one, and it's easy
to adapt the one exception to its removal, so it's effectively useless.
This commit removes it.
This adds some more counts for dense_vector field mapping stats. This
allows for seeing the number of mappings with a given element type,
similarity, or index type.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Submitting a bare runnable to a threadpool risks an exception being
thrown if the queue is full. This commit moves to submitting
`AbstractRunnable` instances that won't be rejected.
Closes#113365
Backport of #113599 to `8.x`
* Ensure that supported params are computed once
A few of today's REST handler implementations compute a new set of
supported parameters on each request. This is needlessly inefficient
since the set never changes. This commit fixes those implementations and
adds assertions to verify that we are returning the exact same instance
each time.
Backport of #113953 to `8.x`
* Fix