Commit Graph

55682 Commits

Author SHA1 Message Date
Nick Knize 6ca3278f96
[Javadocs] Add to remaining o.o.action classes (#3182)
Adds javadocs to remaining undocumented classes in o.o.action package.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-04 13:35:57 -05:00
Kartik Ganesh fc0f446ab2
Upgrading ingest-attachment dependencies (#3111)
* Upgrading Tika from 1.24.1 to 2.1.0 and bumping xmlbeans version

This major version upgrade requires an explicit dependency on tika-parsers-standard-package to import the parser implementations, and an update to the namespace of RTFParser. Also, LanguageIdentifier has been deprecated and replaced by LanguageDetector.

This change includes a bump in xmlbeans version from 3.0.1 to 3.1.0

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

* Upgrade Tika libraries from 2.1.0 to 2.2.0

This also requires a update of Apache Commons-IO from 2.7 to 2.11.0

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

* Upgrade Tika libraries from 2.2.0 to 2.2.1

Also update PDFBox to 2.0.25 as per Tika release notes

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

* Upgraded Tika and xmlbeans libraries

Tika libraries have been upgraded from 2.2.1 to 2.3.0. xmlbeans is now a subproject of POI, so POI was upgraded from 4.1.2 to 5.2.2. With POI 5.x the ooxml-schemas library has been moved to ooxml-lite/ooxml-full. Since ooxml-schemas no longer exists, the LICENSE and NOTICE files in the licenses/ directory have been removed. Finally, xmlbeans has been updated from 3.1.0 to 5.0.2

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

* (In progress) Added tika-langdetect

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

* Upgrading tika libraries to 2.4.0

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

* Switched from tika-langdetect to tika-langdetect-optimaize

To fix the license check, the mapping regex was expanded to tika-.*
This now means the tika-core LICENSE and NOTICE files are no longer needed.

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

* (Work in progress) Switching AttachmentProcessor to use OptimaizeLangDetector

This is a concrete implementation of LanguageDetector. Using this requires bringing in the optimaize dependency.

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

* Manually added LICENSE and NOTICE files for Optimaize language-detector

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

* Move Optimaize dependency to runtimeOnly

Also bring in transitive Guava dependency. This requires manual addition of LICENSE and NOTICE files as with other plugins.

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

* Fix Optimaize langDetector to load models first before detecting

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

* Fallback logic, and test updates

Following the Tika library upgrade, some fallback logic is necessary:
1. "Author" is deprecated for MSOffice document parsing. It is recommended to use CREATOR from Tika Core Properties instead.
2. EPUB parsing no longer automatically extracts keywords. The convention to fall back to SUBJECT is now manually implemented in AttachmentProcessor

Finally, unit tests have been upgraded to account for non-deterministic language results across library upgrades.

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

* Drop Guava version from 31.1 to 18.0

This is the version that Optimaize 0.6 depends on, and it allows for a smaller ignoreViolations list

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

* Fix ingest-attachment integration test to assert correct language

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2022-05-04 09:51:59 -07:00
Nick Knize 40024fcf71
[Javadocs] add to o.o.cluster (#3170)
Adds javadocs to classes in the o.o.cluster package.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 22:18:43 -05:00
Nick Knize c76a4c9014
[Remove] ShrinkAction, ShardUpgradeRequest, UpgradeSettingsRequestBuilder (#3169)
Removes unused ShrinkAction, ShardUpgradeRequest, and
UpgradeSettingsRequestBuilder classes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 22:18:28 -05:00
Nick Knize ad1c8038b0
[Javadocs] add to o.o.action.admin (#3155)
Adds javadocs to classes in package o.o.action.admin.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 22:16:48 -05:00
Nick Knize c13b679aad
[Javadocs] add to o.o.bootstrap, cli, and client (#3163)
Adds javadocs to o.o.bootstrap, o.o.cli, and o.o.client packages.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 14:44:59 -05:00
dependabot[bot] 1b2f154a92
Bump gax-httpjson from 0.62.0 to 0.101.0 in /plugins/repository-gcs (#3058)
* Bump gax-httpjson from 0.62.0 to 0.101.0 in /plugins/repository-gcs

Bumps [gax-httpjson](https://github.com/googleapis/gax-java) from 0.62.0 to 0.101.0.
- [Release notes](https://github.com/googleapis/gax-java/releases)
- [Changelog](https://github.com/googleapis/gax-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/gax-java/commits)

---
updated-dependencies:
- dependency-name: com.google.api:gax-httpjson
  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>

* Added ignoreMissingClasses configuration for gax classes

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kartik Ganesh <gkart@amazon.com>
2022-05-03 10:09:55 -07:00
Nick Knize 5f531b366e
[Remove] AliasesExistAction (#3149)
With the removal of Transport Client AliasesExistAction is no longer needed and
is removed.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 12:05:41 -04:00
Nick Knize 15f035b479
[Remove] TypesExist Action (#3139)
The types exist transport action can be removed now that the TransportClient has
been removed and types support has been removed.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 10:26:37 -04:00
Nick Knize ae4c612580
Fix Emeritus Table in MAINTAINERS.md (#3137)
Fixes emeritus table formatting in Maintainers document.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-03 10:25:55 -04:00
Tianli Feng bb870f70c8
Rename ClusterBlock description 'no master' to 'no cluster-manager' (#3133)
* Rename ClusterBlock description 'no master' to 'no cluster-manager'

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

* Adjust format by spotlessApply task

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-05-03 10:24:37 -04:00
Tianli Feng f58d98d261
Rename reserved node id '_must_join_elected_master_' to '_must_join_elected_cluster_manager_' that used by in DetachClusterCommand (#3116)
Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-05-02 20:23:11 -07:00
Nick Knize 21468279b2
[Javadoc] Add missing package-info.java files to server (#3128)
In preparation for re-enabling the missingJavadoc gradle task this change adds
in the missing package-info.java files to the server folder. For now general
javadocs are added to these files with the intent to clean up with better
descriptions over time.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-02 14:30:53 -05:00
Daniel Doubrovkine (dB.) e12b6b75f4
Sync maintainers with actual permissions. (#3127)
Signed-off-by: dblock <dblock@amazon.com>
2022-05-02 13:20:44 -05:00
dependabot[bot] 2c2c475641
Bump com.diffplug.spotless from 6.4.2 to 6.5.1 (#3121)
Bumps com.diffplug.spotless from 6.4.2 to 6.5.1.

---
updated-dependencies:
- dependency-name: com.diffplug.spotless
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 10:25:21 -07:00
dependabot[bot] 3e22e09384
Bump morfologik-fsa from 2.1.8 to 2.1.9 in /plugins/analysis-ukrainian (#3122)
* Bump morfologik-fsa from 2.1.8 to 2.1.9 in /plugins/analysis-ukrainian

Bumps [morfologik-fsa](https://github.com/morfologik/morfologik-stemming) from 2.1.8 to 2.1.9.
- [Release notes](https://github.com/morfologik/morfologik-stemming/releases)
- [Changelog](https://github.com/morfologik/morfologik-stemming/blob/master/CHANGES.txt)
- [Commits](https://github.com/morfologik/morfologik-stemming/compare/2.1.8...2.1.9)

---
updated-dependencies:
- dependency-name: org.carrot2:morfologik-fsa
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-05-02 10:24:53 -07:00
dependabot[bot] 783ba47e8c
Bump azure-storage-blob from 12.15.0 to 12.16.0 in /plugins/repository-azure (#3123)
* Bump azure-storage-blob in /plugins/repository-azure

Bumps [azure-storage-blob](https://github.com/Azure/azure-sdk-for-java) from 12.15.0 to 12.16.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-java/compare/azure-storage-blob_12.15.0...azure-storage-blob_12.16.0)

---
updated-dependencies:
- dependency-name: com.azure:azure-storage-blob
  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-05-02 10:24:23 -07:00
dependabot[bot] 87e065ed1e
Bump wiremock-jre8-standalone from 2.32.0 to 2.33.2 in /buildSrc (#3124)
Bumps [wiremock-jre8-standalone](https://github.com/wiremock/wiremock) from 2.32.0 to 2.33.2.
- [Release notes](https://github.com/wiremock/wiremock/releases)
- [Commits](https://github.com/wiremock/wiremock/compare/2.32.0...2.33.2)

---
updated-dependencies:
- dependency-name: com.github.tomakehurst:wiremock-jre8-standalone
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 10:23:56 -07:00
dependabot[bot] 4fef5a3e8c
Bump commons-cli from 1.2 to 1.5.0 in /plugins/repository-hdfs (#3125)
* Bump commons-cli from 1.2 to 1.5.0 in /plugins/repository-hdfs

Bumps commons-cli from 1.2 to 1.5.0.

---
updated-dependencies:
- dependency-name: commons-cli:commons-cli
  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-05-02 10:22:57 -07:00
Laurent Arnoud 8a19ccc851
Build: do not ship jdk when no-jdk option set (#3039)
When using package distribution

```
./gradlew :distribution:packages:no-jdk-deb:assemble
```

When `true` this include jdk switch the boolean to the correct value

fix https://github.com/opensearch-project/OpenSearch/issues/3024

Signed-off-by: Laurent Arnoud <laurent.arnoud@platform.sh>
2022-04-29 15:28:34 -04:00
Tianli Feng 017773c62d
Rename BecomeMasterTask to BecomeClusterManagerTask in JoinTaskExecutor (#3099)
Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-28 13:57:49 -04:00
Nick Knize d86c88fe59
[Refactor] XContentType to parse Accept or Content-Type headers (#3077)
Refactors XContentType.fromMediaTypeOrFormat to fromMediaType so Accept headers
and Content-Type headers can be parsed separately. This helps in reusing the
same parse logic in for REST Versioning API support.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-28 09:58:26 -05:00
Prudhvi Godithi da8077de44
Custom plugin backport to main branch (#3095)
Signed-off-by: pgodithi <pgodithi@amazon.com>
2022-04-27 12:22:14 -04:00
Tianli Feng dd7add2568
Replace internal usages of 'master' term in 'client' directory (#3088)
* Replace internal usages of 'master' term in 'client' directory

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

* Add a uni test for NodeSelector to test deprecated master role

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-27 09:09:08 -04:00
Tianli Feng 79eb3b0492
Replace internal usages of 'master' term in 'server/src/main' directory (#2519)
* Replace internal usages of 'master' terminology in server/src/main directory

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

* Restore rename DISCOVERED_MASTER in ClusterHealthResponse

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

* Rename two methods in unit tests

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

* Replace master word in ClusterState

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

* Replace master word in LeaderChecker JoinHelper JoinTaskExecutor

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

* Replace master word in more classes

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

* Replace master word in more classes

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

* Replace master word in more classes

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

* Replace master word in more classes

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

* Replace master word in more classes

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

* Replace master word in more classes

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

* Replace master word in DiscoveryNodes classes

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

* Replace master word in more classes

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

* Correct mistakes

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

* Adjust format by spotlessApply task

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

* Change MASTER__NODE_BOOTSTRAPPED_MSG in test

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

* Fix SnapshotDisruptionIT by renaming to cluster-manager

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-27 09:07:35 -04:00
Poojita Raj 9da0a867b8
updated release note (#3044)
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
2022-04-26 18:13:15 -07:00
Nick Knize 6b641d2fd2
[Remove] Type from nested fields using new metadata field mapper (#3004)
* [Remove] Type from nested fields using new metadata field mapper

types support is removed yet nested documents use the _type field to store the
path for nested documents. A new _nested_path metadata field mapper is added to
take the place of the _type field in order to remove the type dependency in
nested documents. BWC is handled in the new field mapper to ensure compatibility
with older versions.

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

* pr fixes

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

* add test to merge same mapping with empty index settings

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-26 16:20:10 -04:00
Suraj Singh c5ff8d62bf
[Type removal] Remove _type support in NOOP bulk indexing from client benchmark (#3076)
* [Type removal] Remove _type support in bulk indexing from client benchmark

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

* Update README

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-04-26 13:21:31 -04:00
Peng Huo 0bab4730b6
Correct the skip version, multi_terms aggregation is supported on 2.1 (#3072)
Signed-off-by: Peng Huo <penghuo@gmail.com>
2022-04-25 17:07:14 -04:00
Kartik Ganesh ee7b731975
Adds the replication type index setting, alongside a formal notion of feature flags (#3037)
* This change formalizes the notion of feature flags, and adds a "replication type" setting that will differentiate between document and segment replication, gated by a feature flag. 

Since seg-rep is currently an incomplete implementation, the feature flag ensures that the setting is not visible to users without explicitly setting a system property. We can then continue to merge seg-rep related changes from the feature branch to `main` safely hidden behind the feature flag gate.

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

* Update security policy for testing feature flags

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

Co-authored-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-25 10:51:02 -07:00
dependabot[bot] c71dba0dfe
Bump reactor-netty-http from 1.0.16 to 1.0.18 in /plugins/repository-azure (#3057)
* Bump reactor-netty-http in /plugins/repository-azure

Bumps [reactor-netty-http](https://github.com/reactor/reactor-netty) from 1.0.16 to 1.0.18.
- [Release notes](https://github.com/reactor/reactor-netty/releases)
- [Commits](https://github.com/reactor/reactor-netty/compare/v1.0.16...v1.0.18)

---
updated-dependencies:
- dependency-name: io.projectreactor.netty:reactor-netty-http
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 11:50:44 -05:00
dependabot[bot] abad0c5e6e
Bump com.gradle.enterprise from 3.9 to 3.10 (#3055)
Bumps com.gradle.enterprise from 3.9 to 3.10.

---
updated-dependencies:
- dependency-name: com.gradle.enterprise
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 11:48:13 -05:00
dependabot[bot] f3404fdeec
Bump protobuf-java from 3.20.0 to 3.20.1 in /plugins/repository-hdfs (#3062)
* Bump protobuf-java from 3.20.0 to 3.20.1 in /plugins/repository-hdfs

Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf) from 3.20.0 to 3.20.1.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.20.0...v3.20.1)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 11:45:43 -05:00
Daniel Doubrovkine (dB.) a389d1e221
Revert "Support task resource tracking in OpenSearch (#2639)" (#3046)
This reverts commit 6517eeca50.

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-25 11:08:38 -05:00
dependabot[bot] 1c132495b0
Bump json-schema-validator from 1.0.68 to 1.0.69 in /buildSrc (#3060)
Bumps [json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.0.68...1.0.69)

---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
  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-04-25 08:33:14 -07:00
Nick Knize 88bc268e29
[Rename] ESTestCase stragglers to OpenSearchTestCase (#3053)
A few places still referenced legacy ESTestCase name. This refactors those
instances to OpenSearchTestCase.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-23 16:50:55 -05:00
Andriy Redko f438561615
Added explicit 'null' check for response listener to prevent obscure NullPointerException issues (#3048)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-04-22 16:31:14 -04:00
Andriy Redko f006afa969
Temporary adding Apache Lucene repositories for snapshots (#3042)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-04-22 15:23:24 -04:00
Nick Knize 3d49ccead2
[Upgrade] Lucene-9.2-snapshot (#2924) 2022-04-21 14:36:01 -07:00
Andriy Redko 0cbd47c799
Remove JavaVersion in favour of standard Runtime.Version (java-version-checker) (#3027)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-04-21 17:21:51 -04:00
Poojita Raj 0801a9c18a
Add release notes for 1.3.1 (#3029)
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
2022-04-21 14:19:57 -07:00
Nick Knize cf78065481
[Remove] MainResponse version override cluster setting (#3031)
OpenSearch 2.0.0 no longer needs HLRC compatibility with legacy clients. This
commit removes all logic to spoof the version as a legacy cluster.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-21 17:16:57 -04:00
Peng Huo 03fbca3f50
Add new multi_term aggregation (#2687)
Adds a new multi_term aggregation. The current implementation focuses 
on adding new type aggregates. Performance (latency) is suboptimal in this
iteration, mainly because of brute force encoding/decoding a list of values
into bucket keys. A performance improvement change will be made as a 
follow on.

Signed-off-by: Peng Huo <penghuo@gmail.com>
2022-04-21 09:06:33 -05:00
Tushar Kharbanda 6517eeca50
Support task resource tracking in OpenSearch (#2639)
* Add Task id in Thread Context

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Add resource tracking update support for tasks

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* List tasks action support for task resource refresh

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Handle task unregistration case on same thread

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Add lazy initialisation for RunnableTaskExecutionListener

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Segregate resource tracking logic to a separate service.

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Check for running threads during task unregister

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Moved thread context logic to resource tracking service

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* preserve task id in thread context even after stash

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Add null check for resource tracking service

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Tracking service tests and minor refactoring

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Preserve task id fix with test

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Minor test changes and Task tracking call update

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Fix Auto Queue executor method's signature

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Make task runnable task listener factory implement consumer

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Use reflection for ThreadMXBean

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Formatting

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Replace RunnableTaskExecutionListenerFactory with AtomicReference

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Revert "Use reflection for ThreadMXBean"

This reverts commit cbcf3c525bf516fb7164f0221491a7b25c1f96ec.

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Suppress Warning related to ThreadMXBean

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Add separate method for task resource tracking supported check

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Enabled setting by default

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Add debug logs for stale context id

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Remove hardcoded task overhead in tests

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Bump stale task id in thread context log level to warn

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

* Improve assertions and logging

Signed-off-by: Tushar Kharbanda <tushar.kharbanda72@gmail.com>

Co-authored-by: Tushar Kharbanda <tkharban@amazon.com>
2022-04-21 09:51:44 -04:00
Owais Kazi e9ad90b9f6
Removed binary file from linelint (#3015)
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2022-04-20 22:36:58 -05:00
Suraj Singh dbdee30a37
[Type Removal] Remove TypeFieldMapper usage, remove support of `_type` in searches and from LeafFieldsLookup (#3016)
Removes TypeFieldMapper and _type support from searches

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-04-20 22:22:11 -05:00
Wenjun Ruan a34d11f15a
Remove usages of MultiTermQuery.setRewriteMethodsetRewriteMethod (#2997)
Remove usages of MultiTermQuery.setRewriteMethod which is removed in 
latest versions of Lucene.

Signed-off-by: ruanwenjun <wenjun@apache.org>
2022-04-20 22:14:44 -05:00
Kartik Ganesh c7c410a063
Refactoring GatedAutoCloseable and moving RecoveryState.Timer (#2965)
* Refactoring GatedAutoCloseable to AutoCloseableRefCounted

This is a part of the process of merging our feature branch - feature/segment-replication - back into main by re-PRing our changes from the feature branch.
GatedAutoCloseable currently wraps a subclass of RefCounted. Segment replication adds another subclass, but this also wraps RefCounted. Both subclasses have the same shutdown hook - decRef. This change makes the superclass less generic to increase code convergence.

The breakdown of the plan to merge segment-replication to main is detailed in #2355
Segment replication design proposal - #2229

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

* Minor refactoring in RecoveryState

This change makes two minor updates to RecoveryState -
1. The readRecoveryState API is removed because it can be replaced by an invocation of the constructor
2. The class members of the Timer inner class are changed to private, and accesses are only through the public APIs

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

* Update RecoveryTargetTests to test Timer subclasses deterministically

This change removes the use of RandomBoolean in testing the Timer classes and creates a dedicated unit test for each. The common test logic is shared via a private method.

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

* Move the RecoveryState.Timer class to a top-level class

This will eventually be reused across both replication use-cases - peer recovery and segment replication.

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

* Further update of timer tests in RecoveryTargetTests

Removes a non-deterministic code path around stopping the timer, and avoids assertThat (deprecated)

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

* Rename to ReplicationTimer

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

* Remove RecoveryTargetTests assert on a running timer

Trying to serialize and deserialize a running Timer instance, and then checking for equality leads to flaky test failures when the ser/deser takes time.

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2022-04-20 18:02:25 -04:00
Andriy Redko 3b7e654757
Remove JavaVersion, use builtin Runtime.Version to deal with runtime versions (#3006)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-04-20 17:14:02 -04:00
Nick Knize 6915df94c3
[Remove] remaining AllFieldMapper references (#3007)
AllFieldMapper was deprecated in legacy 6x. The remaining references are
removed, along with the field mapper and corresponding tests.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-20 15:05:13 -05:00