Commit Graph

5849 Commits

Author SHA1 Message Date
Rabi Panda 186959a6f5
Add bwc version 1.2.4 (#1796)
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-12-23 10:05:30 -05:00
Andrew Ross 96d55966a2
Use try-with-resources with MockLogAppender (#1595)
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>
2021-12-21 15:00:55 -06:00
Andriy Redko ca27c8fd4f
Update to log4j 2.17.0 (#1771) 2021-12-18 09:36:59 -08:00
Ankit Jain 3ed3fca4ae
Fixing allocation filters to persist existing state on settings update (#1718)
* 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>
2021-12-18 09:06:05 -05:00
Nick Knize 3f210dcfce
Remove LegacyESVersion.V_6_3_x constants (#1691)
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>
2021-12-17 16:24:50 -06:00
Daniel Doubrovkine (dB.) bbb6e656c0
Add version 1.2.3. (#1760)
Signed-off-by: dblock <dblock@dblock.org>
2021-12-17 09:14:37 -08:00
Poojita Raj 4b97713a2f
Bridging the gap in network overhead measurement in the profiler (#1360)
* 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>
2021-12-16 19:50:04 -08:00
Nick Knize 6cc462b92d
[Remove] various builder and mapping deprecations (#1752)
This commit removes the following deprecations and invalid tests:

* LegacyUpdateMappingIntegrationIT
* ShapeBuilder new z axis checks
* MatchPhrase new zeroTermsQuery checks
* TypeQuery utf8
* CompositeValuesSource format checks
* LegacyESVersionTests bumped to 6.8.15
* LegacyDynamicMapping, LegacySimilarity, LegacyMapperService tests

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-16 18:42:39 -06:00
Nick Knize 8c2d8f5431
[Remove] Remaining Flavor Serialization (#1751)
This commit removes unnecessary serialization of unused flavor variable in build
metadata from V_1_3_0+

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-16 17:31:25 -06:00
Nick Knize ef44182731
[Remove] DynamicTemplate deprecations (#1742)
This commit removes legacy version checks in DynamicTemplate parsing that are no
longer valid in OpenSearch 2.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-16 12:52:25 -06:00
Nick Knize 5550f8d7e2
[Remove] Analyzer Deprecations (#1741)
This commit removes deprecated analyzer instantiation that is no longer
permitted in OpenSearch 2.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-16 12:51:49 -06:00
Megha Sai Kavikondala 22bfadf324
Adding a cancelled field to tell if a cancellable task is cancelled (#1732)
* Changes made by adding the Task indicator and the IllegalArgs.

Signed-off-by: meghasaik <kavmegha@amazon.com>

* Changes made by changing the String message for uncancellable task.

Signed-off-by: meghasaik <kavmegha@amazon.com>
2021-12-16 09:49:49 -05:00
Vacha e66ea2c4f3
Avoid logging duplicate deprecation warnings multiple times (#1660)
* Avoid logging duplicate deprecation warnings multiple times

Signed-off-by: Vacha <vachshah@amazon.com>

* Fixes test failures

Signed-off-by: Vacha <vachshah@amazon.com>

* Adding deprecation logger tests

Signed-off-by: Vacha <vachshah@amazon.com>

* Using ConcurrentHashMap keySet

Signed-off-by: Vacha Shah <vachshah@amazon.com>
2021-12-15 15:26:44 -08:00
Sarat Vemulapalli a632b86e4c
Adding 1.2.2 (#1731)
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2021-12-15 10:30:06 -05:00
Andriy Redko 6db435412b
Upgrade to log4j 2.16.0 (#1721)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-12-14 07:34:45 -05:00
Andrew Ross 309649ce8a
Upgrade to logj4 2.15.0 (#1698)
Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-12-10 13:03:41 -08:00
Daniel Doubrovkine (dB.) ec00b86859
Add version 1.2.1. (#1701)
Signed-off-by: dblock <dblock@dblock.org>
2021-12-10 14:47:52 -05:00
Tianli Feng baa10b9b20
Fix unit test testFailsHealthOnHungIOBeyondHealthyTimeout() by incresing the max waiting time before assertion (#1692)
* Increase the max waiting time before checking the FS health after restoring the FS status in the test

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Remove another duplicate assetion statement

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2021-12-10 12:25:57 -05:00
Sarat Vemulapalli e0e6995c4a
Updating Log4j to 2.11.2 (#1696)
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2021-12-10 08:03:45 -08:00
Nick Knize 538b40a0dc
Remove LegacyESVersion.V_6_2_x constants (#1686)
This commit removes LegacyESVersion.V_6_2_x constants including all
pre-release versions and bug fixes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-09 16:08:00 -06:00
Nick Knize 821417b9ab
Remove LegacyESVersion.V_6_1_x constants (#1681)
This commit removes LegacyESVersion.V_6_1_x constants including all
pre-release versions and bug fixes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-08 23:11:36 -06:00
Nick Knize b74d71fb74
Remove 6.0.* version constants (#1658)
This PR removes LegacyESVersion.V_6_0_* constants including all pre-release
versions and bug fixes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-08 13:37:21 -06:00
Nick Knize 33d8677796
Refactor LegacyESVersion tests from Version tests (#1662)
In preparation for removing all LegacyESVersion support by 3.0; this commit
largely refactors the LegacyESVersion test logic from the OpenSearch Version
test logic into an independent test class. This PR also updates Version.fromString
to ensure a proper legacy version is returned when major is > 3 (to support
legacy yaml test and build scripts).

Note that bwc w/ legacy versions are still supported so some cross compatibility
testing is retained in the Version test class.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-07 08:27:17 -06:00
Nick Knize 4db97aa470
[Remove] Deprecated Zen1 Discovery (#1216)
Zen1 discovery was deprecated in Legacy 7.x for eventual removal. OpenSearch 1.x
carries this deprecation. This commit completely removes all support for Zen1
discovery in favor of Zen2.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-03 15:27:10 -06:00
Nick Knize 17e7a4962d
Remove Deprecated SimpleFS (#1639)
Lucene 9 removes support for SimpleFS File System format. This PR completely
removes SimpleFS support which was deprecated in a previous PR.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-12-03 09:57:59 -06:00
Xue Zhou 74943c43c6
Rename field_masking_span to span_field_masking (#1606)
* Rename field_masking_span to span_field_masking

Signed-off-by: Xue Zhou <xuezhou@amazon.com>

* Update SearchModuleTests.java

Signed-off-by: Xue Zhou <xuezhou@amazon.com>

* Rename field_masking_span to span_field_masking

Signed-off-by: Xue Zhou <xuezhou@amazon.com>
2021-11-29 14:01:43 -05:00
Megha Sai Kavikondala 12a229410c
Giving informative error messages for double slashes in API call URLs (#1568)
* Signed-off-by: Megha Sai Kavikondala <kavmegha@amazon.com>

Changes related to Informative error messages.

* Signed-off-by: Megha Sai Kavikondala <kavmegha@amazon.com>

Spotless changes

* Signed-off-by: Megha Sai Kavikondala <kavmegha@amazon.com>

naming and message changes.

Signed-off-by: Megha Sai Kavikondala <kavmegha@amazon.com>

* Signed-off-by: Megha Sai Kavikondala <kavmegha@amazon.com>

Deleting the log message.
2021-11-22 18:01:39 -05:00
Poojita Raj a15c526612
Improve leader node-left logging to indicate timeout/coordination state rejection (#1584) 2021-11-19 13:15:01 -08:00
Andrew Ross d467283475
Start MockLogAppender before adding to static context (#1587)
I observed a test failure with the message
'Attempted to append to non-started appender mock' from an assertion in
`OpenSearchTestCase::after`. I believe this indicates that a
MockLogAppender (which is named "mock") was added as an appender to the
static logging context and some other test in the same JVM happened to
cause a logging statement to hit that appender and cause an error, which
then caused an unrelated test to fail (because they share static state
with the logger). Almost all usages of MockLogAppender start it
immediately after creation. I found a few that did not and fixed those.
I also made a static helper in MockLogAppender to start it upon
creation.

Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-11-19 13:37:46 -05:00
Nick Knize 99a356bfc6
[main] Add staged version 1.3.0 for bwc (#1510)
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-11-04 15:56:08 -05:00
Nick Knize ac37cc99b2
Add staged version 1.1.1 (#1506)
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-11-04 14:19:21 -05:00
Ryan Bogan 286121f0dc
Added logic to allow {dot} files on startup (#1437)
* Added logic to allow {dot} files on startup

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Ensures that only plugin directories are returned by findPluginDirs()

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Prevents . files from being returned as plugins

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
2021-11-04 10:01:55 -04:00
Xue Zhou f54cc382d5
remove codeQL warning about implicit narrowing conversion in compound assignment (#1403)
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
2021-11-02 13:49:25 -07:00
Rabi Panda d45f5dfcab
Make TranslogDeletionPolicy abstract for extension (#1456)
As part of the commit 2ebd0e04, we added a new method to the EnginePlugin to provide a 
custom TranslogDeletionPolicy. This commit makes minTranslogGenRequired method 
abstract in this class for implementation by child classes. The default implementation 
is provided by DefaultTranslogDeletionPolicy.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-11-01 10:25:30 -05:00
Nick Knize 294ad0eb6f
[Upgrade] 1.2 BWC to Lucene 8.10.1 (#1460)
This commit upgrades the BWC 1.2 lucene dependency to version 8.10.1

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-10-29 10:45:29 -07:00
Rabi Panda 2cb71a33b8
Remove deprecated settings and logic for translog pruning by retention lease. (#1416)
The settings and the corresponding logic for translog pruning by retention lease which were added as part of #1100 have been deprecated. This commit removes those deprecated code in favor of an extension point for providing a custom TranslogDeletionPolicy.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-10-29 08:25:12 -07:00
Nick Knize 53334b2ce4
Upgrade to Lucene 8.10.1 (#1440)
This commit upgrades to the latest release of lucene 8.10

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-10-28 10:06:53 -05:00
Andrew Ross 12789f89a3
Close first engine instance before creating second (#1457)
When creating the second instance of an InternalEngine using the same
translog config of the default InternalEngine instance, the second
instance will attempt to delete all the existing translog files. I found
a deterministic test failure when running with the seed
`E3E6AAD95ABD299B`.

As opposed to creating a second engine instance with a different
translog location, just close the first one before creating the second.

Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-10-28 01:11:05 -07:00
Rabi Panda c86d765e7c
Add extension point for custom TranslogDeletionPolicy in EnginePlugin. (#1404)
This commit adds a method that can be used to provide a custom TranslogDeletionPolicy
from within plugins that implement the EnginePlugin interface. This enables plugins to
provide a custom deletion policy with the current limitation that only one plugin can
override the policy. An exception will be thrown if more than one plugin overrides the
policy.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-10-26 09:45:10 -05:00
Andriy Redko acac3cc285
Fixing org.opensearch.repositories.azure.AzureBlobContainerRetriesTests and org.opensearch.action.admin.cluster.node.stats.NodeStatsTests (#1390)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-20 15:27:18 -04:00
Saurabh Singh 284968bb85
Update node attribute check to version update (1.2) check for shard indexing pressure serialization. (#1395)
This commit adds an explicit version check for shard indexing pressure 
serialization. This is required to not mandate test have the cluster service 
initialized while asserting node attributes.

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: Saurabh Singh <sisurab@amazon.com>
2021-10-20 12:18:46 -05:00
Nick Knize ecac8d3c38
Add EngineConfig extensions to EnginePlugin (#1387)
This commit adds an extension point to EngineConfig through EnginePlugin using
a new EngineConfigFactory mechanism. EnginePlugin provides interface methods to
override configurations in EngineConfig. The EngineConfigFactory produces a new
instance of the EngineConfig using these overrides. Defaults are used absent
overridden configurations.

This serves as a mechanism to override Engine configurations (e.g., CodecService,
TranslogConfig) enabling Plugins to have higher fidelity for changing Engine
behavior without having to override the entire Engine (which is only permitted for
a single plugin).

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-10-19 23:04:28 -05:00
Owais Kazi 996d33adb2
Run spotless and exclude checkstyle on server module (#1380)
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2021-10-19 08:32:54 -04:00
Saurabh Singh 24fd89a1fd
Minor fix for the flaky test to reduce concurrency (#1361) (#1364)
Fixes flakiness for test testReplicaThreadedThroughputDegradationAndRejection.

Reduced the number of threads concurrently executing from the initial range between (100-120) to a new range between (80-100), as the previous range was breaking the node limits set as 10kb, for every execution where number of threads were greater than 110.

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
2021-10-14 15:25:17 -07:00
Andriy Redko 3779576c51
Modernize and consolidate JDKs usage across all stages of the build. Use JDK-17 as bundled JDK distribution to run tests (#1358)
* Modernize and consolidate JDKs usage across all stages of the build. Use JDK-17 as bundled JDK distribution to run tests

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Using -Djava.security.egd=file:/dev/urandom explicitly for cli tests

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-13 17:25:48 -04:00
Andriy Redko e9635d6bfe
Replace securemock with mock-maker (test support), update Mockito to 3.12.4 (#1332)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-10 14:18:54 -04:00
Saurabh Singh 3665daf5d0
Add Shard Level Indexing Pressure (#1336)
Shard level indexing pressure improves the current Indexing Pressure framework which performs memory accounting at node level and rejects the requests. This takes a step further to have rejections based on the memory accounting at shard level along with other key performance factors like throughput and last successful requests. 

**Key features**
- Granular tracking of indexing tasks performance, at every shard level, for each node role i.e. coordinator, primary and replica.
- Smarter rejections by discarding the requests intended only for problematic index or shard, while still allowing others to continue (fairness in rejection).
- Rejections thresholds governed by combination of configurable parameters (such as memory limits on node) and dynamic parameters (such as latency increase, throughput degradation).
- Node level and shard level indexing pressure statistics exposed through stats api.
- Integration of Indexing pressure stats with Plugins for for metric visibility and auto-tuning in future.
- Control knobs to tune to the key performance thresholds which control rejections, to address any specific requirement or issues.
- Control knobs to run the feature in shadow-mode or enforced-mode. In shadow-mode only internal rejection breakdown metrics will be published while no actual rejections will be performed.

The changes were divided into small manageable chunks as part of the following PRs against a feature branch.

- Add Shard Indexing Pressure Settings. #716
- Add Shard Indexing Pressure Tracker. #717
- Refactor IndexingPressure to allow extension. #718
- Add Shard Indexing Pressure Store #838
- Add Shard Indexing Pressure Memory Manager #945
- Add ShardIndexingPressure framework level construct and Stats #1015
- Add Indexing Pressure Service which acts as orchestrator for IP #1084
- Add plumbing logic for IndexingPressureService in Transport Actions. #1113
- Add shard indexing pressure metric/stats via rest end point. #1171
- Add shard indexing pressure integration tests. #1198

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: Rabi Panda <adnapibar@gmail.com>
2021-10-07 11:06:15 -07:00
Andriy Redko d46c206f29
[BUG] ConcurrentSnapshotsIT#testAssertMultipleSnapshotsAndPrimaryFailOver fails intermittently (#1311)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-30 12:44:29 -04:00
Andriy Redko 180db5cd09
Support for Heap after GC stats (correction after backport to 1.2.0) (#1315)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-30 09:48:24 -04:00
Andriy Redko 80388a8a29
Support for Heap after GC stats (#1265)
* Support for Heap after GC stats

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Addressing code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Using the right version 2.0.0 (instead of 1.2.0) for the change

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-28 14:40:00 -04:00