Fix composite aggregation failed test cases introduce by missing_order parameter by using MissingOrder to decide null values's order in InternalBucket.
Signed-off-by: Peng Huo <penghuo@gmail.com>
Remove deprecated max_merge_at_once_explicit parameter since it has been
removed in lucene 9 and deprecated in opensearch 1.3
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Lucene 9 removes the ability to define an explicit version on an analysis
component so remove the the version parameter and deprecation warning
prohibiting users from explicitly setting versioned analyzers.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
* Added timeout to ensureGreen() for testClusterGreenAfterPartialRelocation
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
* Fixed spotless imports
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Remove the deprecated sync flush API which was replaced by sequence
number and retention lease mechanisms and no longer used in 2.0.0.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Lucene 9 removes the ability to define an explicit version on an analysis
component. The version parameter is deprecated at parse time and a warning is
issued
to the user through the deprecation logger.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
max_merge_at_once_explicit is removed in lucene 9 so the index setting is
deprecated for removal in the next major release.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Adds support for _first and _last parameters for missing bucket ordering in composite aggregation.
By default, if order is asc, missing_bucket at first, if order is desc, missing_bucket at last. If
missing_order is "_first" or "_last", regardless order, missing_bucket is at first or last respectively.
Signed-off-by: Peng Huo <penghuo@gmail.com>
Logically delay the request size calculation until it's absolutely required by the
indexing pressure framework.
Signed-off-by: Saurabh Singh <sisurab@amazon.com>
Add support for setting the max expansions on a wildcard interval.
The default value is still 128 and the max value is bounded by
`BooleanQuery.getMaxClauseCount()`.
Signed-off-by: Matt Weber <matt@mattweber.org>
Soft Deletes have been enabled by default since Legacy version 7.0 and made
mandatory in Version 2.0.0. This commit refactors the InternalEngine to always
use soft-deletes. It is a follow on to making soft deletes mandatory in 2.0.0.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
* [BUG] Wait for outstanding requests to complete in LastSuccessfulSettingsUpdate test
Signed-off-by: Suraj Singh <surajrider@gmail.com>
* [BUG] Wait for outstanding requests to complete in LastSuccessfulSettingsUpdate test
Signed-off-by: Suraj Singh <surajrider@gmail.com>
When some node or set of nodes is excluded (based on some cluster setting)
BalancedShardsAllocator iterates over them in breadth first order picking 1 shard from
each node and repeating the process until all shards are balanced. Since shards from
each node are picked randomly it's possible the p and r of shard1 is relocated first
leaving behind both p and r of shard2. If the excluded nodes were to go down the
cluster becomes red.
This commit introduces a new setting "cluster.routing.allocation.move.primary_first"
that prioritizes the p of both shard1 and shard2 first so the cluster does not become
red if the excluded nodes were to go down before relocating other shards. Note that
with this setting enabled performance of this change is a direct function of number
of indices, shards, replicas, and nodes. The larger the indices, replicas, and
distribution scale, the slower the allocation becomes. This should be used with care.
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
* [BWC] Ensure 2.x compatibility with Legacy 7.10.x
This commit fixes TransportHandshaker to send a spoofed Legacy 7.10.2 mincompat
version to ensure OpenSearch 2.x nodes can join a Legacy 7.10.x cluster for
rolling upgrade support. Without this change 7.10.x and OpenSearch 2.x mixed
cluster bwc tests would fail.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
* fix AbstractSimpleTransportTestCase failures
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
* change v3 to local static
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
* make V_3_0_0 package private and reuse in test
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This test fails due to equality check of majors between OpenSearch Version 1.x and LegacyESVersion 7.x. They should be equivalent but in this case the check fails and LegacyVersion.v6.8.x is chosen which was removed in 52508d5.
This change fixes the comparison logic by using `Version.compareMajor` method instead.
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
* Concurrent Searching (Experimental): modify profiling implementation to support concurrent data collection
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
* Addressing code review comments
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
* Remove v6.5.x constants
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
* Address code review comments.
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
* Add back version assumption for testRemoteClusterSettingsUpgraded
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
* Remove unused import after rebase.
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit removes the `LegacyVersion.v6.4.x` constants and their usages, since we no longer need to support those in OpenSearch 2.0 onwards.
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
I previously added a helper that started a MockLogAppender to ensure it
was never added to a Logger before it was started. I subsequently found
the opposite case in RolloverIT.java where the appender was stopped
before it was closed, therefore creating a race where a concurrently
running test in the same JVM could cause a logging failure. This seems
like a really easy mistake to make when writing a test or introduce when
refactoring a test. I've made a change to use try-with-resources to
ensure that proper setup and teardown is done. This should make it much
harder to introduce this particular test bug in the future.
Unfortunately, it did involve touching a lot of files. The changes here
are purely structural to leverage try-with-resources; no testing logic
has been changed.
Signed-off-by: Andrew Ross <andrross@amazon.com>
* Fixing allocation filters to persist existing state on settings update
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
* Adding test for filter settings update
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
* Adding more tests and review comments
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
* Adding assertion and unit test for operation type mismatch
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
* Updating test names
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
This commit removes LegacyESVersion.V_6_3_x constants including all
pre-release versions and bug fixes.
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
* Bridging the gap in network overhead measurement in the profiler
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
* add tests + remove total n/w time field
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
* refactor network time into a class
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
* gradle test fix
Signed-off-by: Poojita Raj <poojiraj@amazon.com>