* [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>
It seems that the hectic retrying with a new cluster state update just makes things worse. The initial deletion after the relocation might take a bit, I assume also more visible in this test because we've made shard close async in #108145. After that we just check once and if the shard dir is there we keep pushing new cluster states and checking again and this keeps failing with the check mentioned here.
I've picked a simple solution since this is a test issue and just check a bit longer before triggering the new cluster state update. I've looked into a couple of other hooks (e.g. IndexFoldersDeletionListener#beforeIndexFoldersDeleted and org.elasticsearch.indices.cluster.IndicesClusterStateService#onClusterStateShardsClosed ) to see if we could rely on them rather than the assertBusy used here. None unfortunately seem to be cleanly allow getting rid of the assertBusy. IMO, since the shard store deletion is retried and guarantees to eventually work, to avoid flaky tests, we should still keep relying on the retries initiated by the cluster state update.
I'll keep the issue open for a while before removing the extra logging. Running it locally has not failed.
Relates #111134
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Retrieve the source for objects and arrays within arrays in a separate parsing phase (#113027)
In synthetic source, storing array elements to `_ignored_source` may
hide other, regular elements from showing up during source synthesizing.
This is due to contents from `_ignored_source` taking precedence over
matching fields from regular source loading.
To avoid this, arrays are pre-emptively tracked and marked for source
storing, if any of their elements needs to store its source. A second
doc parsing phase is introduced that checks for fields missing values
and records their source, while skipping objects and arrays that don't
contain any such fields.
Fixes#112374
(cherry picked from commit 4ff4384550)
# Conflicts:
# muted-tests.yml
* merge
* fix compilation error, jdk-21 function
Larger number of indexing operations can take a while to complete on
slower machines for which we need to wait for longer.
Relates: #111957Resolves: #112423
The error message changed slightly to include the failure location. While this
was added to the main test yml file, the yamlRestTestV7CompatTest resources seem
to get copied from v7 files and we then modify them if we expect any changes.
Closes#112580
This stops the `BlockHash`es from emitting empty pages when the batch
size and number of results from a page lines up. It doesn't hurt the
aggs, but it was making testing more complex than we'd like.
Closes#112443Closes#112442
The switch to Java 23 removed support for COMPAT locale provider, so
running old versions (< 8.15.2) in a mixed cluster will result in
different results for date format (eg. month and day names are truncated
to three letters).
Fixes https://github.com/elastic/elasticsearch/issues/112617
Closes https://github.com/elastic/elasticsearch/issues/112312.
YetAnotherRandomizationIssue :)
Under some weird seeds we could end up with 0-length `RankDoc` arrays
for both the original and the mutated `RankDocsSortBuilder` instances.
In this PR we just ensure that a 0-length mutation will not be possible.
Scale factors less than about 5.6e-309 will result in NaN (due to 1/scaleFactor being infinity).
We could fix this better, by detecting that the scaled result of 0 can never be scaled back to any original value other than 0 itself (due to irretrievable loss of precision).
That would require making a simple conditional check in about three places in the ScaledFloatFieldMapper class where the scaling-back is done.
But as a quick fix, we just avoid this case in the tests for now.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>