Commit Graph

55388 Commits

Author SHA1 Message Date
Nick Knize 05a5819243
[Upgrade] Lucene 9.1.0-snapshot-ea989fe8f30 (#2487)
* [Upgrade] Lucene 9.1.0-snapshot-ea989fe8f30

Upgrades from Lucene 9.0.0 to 9.1.0-snapshot-ea989fe8f30 in preparation for
9.1.0 GA.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* Add spanishplural token filter

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* fix KNOWN_TOKENIZERS

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-16 15:47:25 -04:00
Nick Knize bd21043d65
[Unmute] IndexPrimaryRelocationIT (#2488)
Unmutes IndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing which was
fixed by LuceneChangesSnapshot using accurate ops history.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-16 12:30:48 -05:00
John Mazanec f52f6f5052
Add default for EnginePlugin.getEngineFactory (#2419)
Adds default implementation for getEngineFactory in EnginePlugin. The
default just returns Optional.empty(), allowing plugin developers to
implement this plugin without implementing this method.

Signed-off-by: John Mazanec <jmazane@amazon.com>
2022-03-16 12:28:24 -05:00
Lukáš Vlček 02ffd4c548
Rename reference to project OpenSearch was forked from (#2483)
Fixing log message and renaming internal variable.
Improving internal JavaDoc.

Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
2022-03-16 12:03:22 -05:00
Andriy Redko 77d106015f
Fixing PluginsServiceTests (post Lucene 9 update) (#2484)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-16 11:17:33 -04:00
Rishikesh Pasham 10b9986e12
Override Default Distribution Download Url with Custom Distribution Url when it is passed from Plugin (#2420)
* Override default Distribution Download URL with custom Distribution URL

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Accidently made commit to main branch, this revives it.Override default Distribution Download URL with custom Distribution URL

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Override Default DistributionDownloadUrl with customDistribution Url passed from Plugins

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
2022-03-15 14:01:28 -07:00
Nick Knize 006c832c5f
[Upgrade] Lucene 9.0.0 release (#1109)
This commit upgrades the core codebase from Lucene 8.10.1 to
lucene 9.0.0. It includes all necessary refactoring of features and
API changes when upgrading to a new major Lucene release.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Co-authored-by: Andriy Redko <drreta@gmail.com>
2022-03-15 15:48:13 -05:00
Nick Knize 757abdb9a0
[Refactor] LuceneChangesSnapshot to use accurate ops history (#2452)
Improves the LuceneChangesSnapshot to get an accurate count of recovery
operations using sort by sequence number optimization.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-15 13:13:54 -05:00
Kyle J. Davis b69dc335ad
Add trademark notice (#2473)
* adds notice to README

Signed-off-by: Kyle Davis <kyledvs@amazon.com>

* adds trademark heading

Signed-off-by: Kyle Davis <kyledvs@amazon.com>
2022-03-15 11:56:00 -04:00
Andriy Redko 12dd5d76b5
repository-azure: revert the fix for https://github.com/opensearch-project/OpenSearch/issues/1734 once upstream solution is available (#2446)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-15 11:43:20 -04:00
Nick Knize b619a050bf
[Remove] types based addMapping method from CreateIndexRequest and Builder (#2460)
Removes the obsolete types based .addMapping method from CreateIndexRequest and
CreateIndexRequestBuilder. Tests are refactored to use the new source only
setMapping method.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-15 10:31:31 -05:00
Nick Knize 7df40ee1b0
[Remove] type from TaskResults index and IndexMetadata.getMappings (#2469)
Removes types from the TaskResults internal index along with the getMappings
method from IndexMetadata. This is needed to further remove types from
CreateIndexRequest.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-15 01:05:58 -05:00
Suraj Singh 02d000c514
[Remove] Type query (#2448)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-14 20:46:23 -07:00
Suraj Singh 2b68b14629
[Remove] Type from TermsLookUp (#2459)
* [Remove] Type from TermsLookUp

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Fix unit test failure

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-14 19:09:04 -07:00
Andriy Redko 5c0f9bc499
Discrepancy in result from _validate/query API and actual query validity (#2416)
* Discrepancy in result from _validate/query API and actual query validity

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

* Moved the validate() check later into the flow to allow range validation to trigger first

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-14 14:11:26 -07:00
dependabot[bot] d19081356a
Bump woodstox-core from 6.1.1 to 6.2.8 in /plugins/repository-azure (#2456)
* Bump woodstox-core from 6.1.1 to 6.2.8 in /plugins/repository-azure

Bumps [woodstox-core](https://github.com/FasterXML/woodstox) from 6.1.1 to 6.2.8.
- [Release notes](https://github.com/FasterXML/woodstox/releases)
- [Commits](https://github.com/FasterXML/woodstox/compare/woodstox-core-6.1.1...woodstox-core-6.2.8)

---
updated-dependencies:
- dependency-name: com.fasterxml.woodstox:woodstox-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2022-03-14 12:47:11 -07:00
dependabot[bot] 189563bad6
Bump commons-lang3 from 3.4 to 3.12.0 in /plugins/repository-azure (#2455)
* Bump commons-lang3 from 3.4 to 3.12.0 in /plugins/repository-azure

Bumps commons-lang3 from 3.4 to 3.12.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2022-03-14 09:36:26 -07:00
Nick Knize bdcaec5caf
[Remove] types from Uid and remaining types/Uid from translog (#2450)
Removes types from UID class along with cleaning up all obsolete MapperService
dependendices. This includes removing UID from the Translog Delete operation
which is no longer needed due to type dependency removal.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-13 12:49:51 -05:00
Nick Knize 95d4750249
[Remove] types from translog (#2439)
Removes persisting the type in the translog since types are no longer supported.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-12 14:03:00 -06:00
Suraj Singh 6f12fa19e8
[Remove] Type mapping end-points from RestMultiSearchTemplateAction (#2433)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-11 09:36:37 -08:00
Nick Knize b00b3ce2b5
[Remove] Multiple Types from IndexTemplateMetadata (#2400)
Removes multi-type support from IndexTemplateMetadata so that instead of holding
a map of multiple types to mappings, it only returns a single mapping for a
single type. Also removes type from documentMapper() method to avoid any
accidental NullPointerExceptions in the internal mapping retrieval.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-10 22:36:08 -06:00
Kartik 9cfa395128
Remove the IndexCommitRef class (#2421)
This inner class is no longer required because its functionality has been moved to the generic GatedCloseable class.

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2022-03-10 10:12:17 -08:00
Andriy Redko c8d80090f4
Fixing bwcVersions and bwc builds (#2430) - adding 1.4.0 into main bwcVersions
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-10 08:46:08 -08:00
Kartik fb9e150076
Refactoring gated and ref-counted interfaces and their implementations (#2396)
* Reducing duplication in plugins around ref-counted releasable classes

Both AmazonEc2Reference and AmazonS3Reference duplicate the same logic - a subclass of AbstractRefCounted that also implements Releasable. This change centralizes this paradigm into a AbstractRefCountedReleasable class and supports both clients via generics. It also updates all fetching implementations to use the get() method instead of client()

Signed-off-by: Kartik Ganesh <gkart@amazon.com>

* Introduce Reference classes for the Closeable and AutoCloseable interfaces

These classes allow you to wrap a reference instance with an onClose runnable that is executed when close() is invoked. Two separate classes are needed because the close() signatures for the two interfaces are different. This change takes the first step to have implementing classes extend from these generic superclasses, before attempting to remove the subclasses entirely. The get() method is also replaced throughout the code base.

Note that there is also a separate Releasable interface that has a similar access pattern, but is implemented separately. This is used in AbstractRefCountedReleasable introduced in a prior commit

Signed-off-by: Kartik Ganesh <gkart@amazon.com>

* More improvements and refactoring

* Functionality around one-way gating is now moved to a dedicated class - OneWayGate. This replaces duplicate functionality throughout the code.
* The two *Reference classes have been renamed to Gated* since that better represents their functionality
* The AbstractRefCountedReleasable has been improved to no longer be abstract by accepting the shutdown hook. This removes the need for the inner class in ReleasableBytesReference, and further simplifies the plugin subclasses (these could probably be removed entirely).
* Finally, unit tests have been added for some classes

Signed-off-by: Kartik Ganesh <gkart@amazon.com>

* Added tests for GatedCloseable

Also updated the license information in GatedAutoCloseableTests

Signed-off-by: Kartik Ganesh <gkart@amazon.com>

* Fixing license information in new files

Signed-off-by: Kartik Ganesh <gkart@amazon.com>

* Added unit tests for RefCountedReleasable

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2022-03-09 12:21:09 -08:00
Nick Knize 5a9a11416d
[Remove] TrimUnsafeCommit logic for legacy 6.x indexes (#2225)
* [Remove] TrimUnsafeCommit logic for legacy 6.x indexes

Multiple txlog commits was introduced in legacy 7.x. Legacy 6.x indexes could
therefore not have a safe commit. Since OpenSearch 2.0 is no longer compatible
with legacy 6.x indexes, the logic to trim these unsafe commits is safely
removed.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* fix assertion typo

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* rebase and incorporate pr feedback

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-09 10:50:05 -08:00
Andriy Redko 9c679cbbfc
MapperService has to be passed in as null for EnginePlugins CodecService constructor (#2177)
* MapperService has to be passed in as null for EnginePlugins CodecService constructor

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

* Addressing code review comments

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

* Delayed CodecService instantiation up to the shard initialization

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

* Added logger (associated with shard) to CodecServiceConfig

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

* Refactored the EngineConfigFactory / IndexShard instantiation of the CodecService

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-08 18:42:32 -05:00
Suraj Singh a6a47e7321
Remove inclue_type_name parameter from rest api spec (#2410)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-08 14:43:04 -08:00
Daniel Doubrovkine (dB.) 044f53630a
Set target and source compatibility to 11, required by Lucene 9. (#2407)
* Set target and source compatibility to 11, required by Lucene 9.

Signed-off-by: dblock <dblock@dblock.org>

* Uncomment commented code in #2321 for killing child processes that uses JDK9+ ProcessInfo.

Signed-off-by: dblock <dblock@dblock.org>

* Set distribution checker target JDK compatibility to 11.

Signed-off-by: dblock <dblock@dblock.org>

* Supress processing warnings.

Signed-off-by: dblock <dblock@dblock.org>
2022-03-08 14:48:51 -05:00
Nick Knize c3712a51b3
[Remove] include_type_name from HLRC (#2397)
Removes include_type_name from the high level reset client along with relevant
deprecated methods in IndicesClient. All tests are updated to remove the
parameter from the rest requests along with various toXContent methods that are
no longer required.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-08 11:30:27 -06:00
Tianli Feng 63c75d1b1d
Deprecate setting 'reindex.remote.whitelist' and introduce the alternative setting 'reindex.remote.allowlist' (#2221)
* Add setting reindex.remote.allowlist, and deprecate setting reindex.remote.whitelist

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

* Add unit test for renaming the setting reindex.remote.allowlist

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

* Remove system.out.println()

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

* Adjust format by spotlessApply task

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

* Replace REMOTE_CLUSTER_WHITELIST with REMOTE_CLUSTER_ALLOWLIST

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

* Add a unit test to test final setting value when both settings have got a value

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

* Rename the unit test class name

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

* Remove the Access modifiers public from the constant REMOTE_CLUSTER_WHITELIST

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

* Initialize ReindexPlugin without using the @Before method

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

* Rename 'unwhitelisted' to 'unallowlisted' in a yml file used for REST api testing.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-03-08 11:35:36 -05:00
Andriy Redko 65debde436
Update the BWC versions (post 1.x backport) (#2390)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-08 08:30:48 -08:00
Suraj Singh 919d18036e
Remove type end-points from count action (#2379)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-07 12:43:05 -08:00
dependabot[bot] 1f0361a929
Bump asm-commons from 5.0.4 to 9.2 in /modules/lang-expression (#2385)
* Bump asm-commons from 5.0.4 to 9.2 in /modules/lang-expression

Bumps asm-commons from 5.0.4 to 9.2.

---
updated-dependencies:
- dependency-name: org.ow2.asm:asm-commons
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2022-03-07 10:28:17 -08:00
dependabot[bot] 09e16e3139
Bump guava from 30.1.1-jre to 31.1-jre in /plugins/repository-azure (#2382)
* Bump guava from 30.1.1-jre to 31.1-jre in /plugins/repository-azure

Bumps [guava](https://github.com/google/guava) from 30.1.1-jre to 31.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2022-03-07 13:08:07 -05:00
Subhobrata Dey e1fd4b75b4
Add valuesField in PercentilesAggregationBuilder streamInput constructor (#2308)
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
2022-03-07 11:51:49 -05:00
dependabot[bot] 4395ed560f
Bump guava in /distribution/tools/upgrade-cli (#2383)
Bumps [guava](https://github.com/google/guava) from 31.0.1-jre to 31.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:48:38 -05:00
dependabot[bot] 72c5d81187
Bump guava in /distribution/tools/keystore-cli (#2384)
Bumps [guava](https://github.com/google/guava) from 31.0.1-jre to 31.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:48:18 -05:00
dependabot[bot] 75e837d056
Bump guava from 31.0.1-jre to 31.1-jre in /distribution/tools/plugin-cli (#2387)
Bumps [guava](https://github.com/google/guava) from 31.0.1-jre to 31.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:48:00 -05:00
dependabot[bot] 3e9031f283
Bump gradle-extra-configurations-plugin from 3.0.3 to 7.0.0 in /buildSrc (#2386)
Bumps [gradle-extra-configurations-plugin](https://github.com/nebula-plugins/gradle-extra-configurations-plugin) from 3.0.3 to 7.0.0.
- [Release notes](https://github.com/nebula-plugins/gradle-extra-configurations-plugin/releases)
- [Changelog](https://github.com/nebula-plugins/gradle-extra-configurations-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nebula-plugins/gradle-extra-configurations-plugin/compare/v3.0.3...v7.0.0)

---
updated-dependencies:
- dependency-name: com.netflix.nebula:gradle-extra-configurations-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:47:37 -05:00
Owais Kazi 9224537704
Updated the url for docker distribution (#2325)
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2022-03-04 18:58:13 -06:00
Suraj Singh d5e58a2f3d
[Remove] Type mappings from GeoShapeQueryBuilder (#2322)
* Remove type end-points from GeoShapeBuilder

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Fix integration test failures

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-04 16:40:47 -08:00
aponb be64af2f90
Replace exclusionary words whitelist and blacklist in the places that won't impact backwards compatibility (#2178)
* Replace the exclusionary word whitelist with allowlist, and blacklist with denylist, in code commet and internal variable/method/class/package name.

Signed-off-by: Andreas <apre@gmx.at>
2022-03-04 16:34:09 -08:00
Andriy Redko ae52008463
Fixing the --release flag usage for javac (#2343) (#2352)
* Fixing the --release flag usage for javac (#2343)

* Fixing the --release flag usage for javac

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

* Fixing the --html5 flag usage for javadoc

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

* Fix java-version-checker source/target compatibility settings (#2354)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-04 17:44:52 -05:00
Nick Knize 0cc2c9be6a
[Remove] types from PutMappingRequest (#2335)
Remove type support from putMappingRequest, dependencies, and all tests.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-04 13:30:43 -06:00
Nick Knize 729bc43a88
[Test-Failure] Mute TranslogPolicyIT (#2342)
This test is slated for removal as it only applies to ancient indexes (Legacy
6.x). Muting test so bwc tests are consistent and no longer angry.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-04 10:52:24 -06:00
Andriy Redko 5f90227a05
Add '_name' field support to score functions and provide it back in explanation response (#2244)
* Add '_name' field support to score functions and provide it back in explanation response

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

* Address code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-04 11:12:27 -05:00
Daniel Doubrovkine (dB.) ae14259a2c
Restore Java 8 compatibility for build tools. (#2300) (#2321)
* Restore Java 8 compatibility for build tools.

Signed-off-by: dblock <dblock@dblock.org>

* Make source code compatible with Java 8.

Signed-off-by: dblock <dblock@dblock.org>
2022-03-03 14:34:53 -06:00
dependabot[bot] cb57b9202b
Bump log4j-core in /buildSrc/src/testKit/thirdPartyAudit/sample_jars (#2281)
Bumps log4j-core from 2.17.1 to 2.17.2.

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-03 14:23:47 -05:00
Vacha Shah cdb42ad301
Remove Github DCO action since DCO runs via Github App now (#2317)
Signed-off-by: Vacha Shah <vachshah@amazon.com>
2022-03-03 10:39:27 -08:00
Andrey Pleskach f13b951c70
Add support of SOCKS proxies for S3 repository (#2160)
Signed-off-by: Andrey Pleskach <ples@aiven.io>
2022-03-02 17:36:09 -05:00