Commit Graph

2919 Commits

Author SHA1 Message Date
Andriy Redko 6c769d4fca
Support use of IRSA for repository-s3 plugin credentials: added YAML Rest test case (#3499)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-06-06 13:36:34 -04:00
dependabot[bot] ff75307952
Bump hadoop-minicluster in /test/fixtures/hdfs-fixture (#3359)
Bumps hadoop-minicluster from 3.3.2 to 3.3.3.

---
updated-dependencies:
- dependency-name: org.apache.hadoop:hadoop-minicluster
  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-05-25 10:20:52 -07:00
Marc Handalian a0030dfb47
Add a new Engine implementation for replicas with segment replication enabled. (#3240)
* Change fastForwardProcessedSeqNo method in LocalCheckpointTracker to persisted checkpoint.

This change inverts fastForwardProcessedSeqNo to fastForwardPersistedSeqNo for use in
Segment Replication.  This is so that a Segrep Engine can match the logic of InternalEngine
where the seqNo is incremented with each operation, but only persisted in the tracker on a flush.
With Segment Replication we bump the processed number with each operation received index/delete/noOp, and
invoke this method when we receive a new set of segments to bump the persisted seqNo.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Extract Translog specific engine methods into an abstract class.

This change extracts translog specific methods to an abstract engine class so that other engine
implementations can reuse translog logic.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add a separate Engine implementation for replicas with segment replication enabled.

This change adds a new engine intended to be used on replicas with segment replication enabled.
This engine does not wire up an IndexWriter, but still writes all operations to a translog.
The engine uses a new ReaderManager that refreshes from an externally provided SegmentInfos.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix spotless checks.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix :server:compileInternalClusterTestJava compilation.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix failing test naming convention check.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR feedback.

- Removed isReadOnlyReplica from overloaded constructor and added feature flag checks.
- Updated log msg in NRTReplicationReaderManager
- cleaned up store ref counting in NRTReplicationEngine.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix spotless check.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove TranslogAwareEngine and build translog in NRTReplicationEngine.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix formatting

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add missing translog methods to NRTEngine.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove persistent seqNo check from fastForwardProcessedSeqNo.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR feedback.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add test specific to translog trimming.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Javadoc check.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add failEngine calls to translog methods in NRTReplicationEngine.
Roll xlog generation on replica when a new commit point is received.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2022-05-24 10:18:18 -07:00
Rishikesh Pasham fd5a38de12
Adding CheckpointRefreshListener to trigger when Segment replication is turned on and Primary shard refreshes (#3108)
* Intial PR adding classes and tests related to checkpoint publishing

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

* Putting a Draft PR with all changes in classes. Testing is still not included in this commit.

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

* Wiring up index shard to new engine, spotless apply and removing unnecessary tests and logs

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

* Adding Unit test for checkpointRefreshListener

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

* Applying spotless check

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

* Fixing import statements *

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

* removing unused constructor in index shard

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

* Addressing comments from last commit

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

* Adding package-info.java files for two new packages

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

* Adding test for null checkpoint publisher and addreesing PR comments

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

* Add docs for indexshardtests and remove shard.refresh

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
2022-05-24 07:08:14 -07:00
Poojita Raj a023ad9cba
[segment replication]Introducing common Replication interfaces for segment replication and recovery code paths (#3234)
* RecoveryState inherits from ReplicationState + RecoveryTarget inherits from ReplicationTarget

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* Refactoring: mixedClusterVersion error fix + move Stage to ReplicationState

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* pull ReplicationListener into a top level class + add javadocs + address review comments

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* fix javadoc

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* review changes

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* Refactoring the hierarchy relationship between repl and recovery

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* style fix

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* move package common under replication

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* rename to replication

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* rename and doc changes

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
2022-05-23 12:19:54 -07:00
Nick Knize 5358502107
[Upgrade] Lucene-9.2.0-snapshot-ba8c3a8 (#3416)
Upgrades to latest snapshot of lucene 9.2.0 in preparation for GA release.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-05-20 16:29:51 -05:00
Suraj Singh 6699624dde
[Type removal] _type removal from tests of yaml tests (#3406)
* [Type removal] _type removal from tests of yaml tests

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

* Fix spotless failures

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

* Fix assertion failures

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

* Fix assertion failures in DoSectionTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-05-20 10:29:55 -04:00
Tianli Feng 507f8ccdbd
Replace internal usages of 'master' term in 'server/src/internalClusterTest' directory (#2521)
Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-05-19 10:23:59 -07:00
Owais Kazi e73a410139
Used set to make shell scripts more strict (#3278)
* Use set to make shell scripts more strict

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Change -o pipefail to -e

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Set scripts to standard rule

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2022-05-16 14:05:13 -04:00
Andriy Redko 38fb1d9275
Add resizable search queue to OpenSearch (picking up #826) (#3207)
* Make search/write queue resizable

Signed-off-by: Ruizhen <ruizhen@amazon.com>

* Address PR comments

Signed-off-by: Ruizhen <ruizhen@amazon.com>

* Refactoring resizable queue implementation

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

* Addressing code review comments

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

* Addressing code review comments

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

* Addressing code review comments

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

Co-authored-by: Ruizhen <ruizhen@amazon.com>
2022-05-16 08:37:41 -04:00
Tianli Feng 10bff0c9f5
Replace internal usages of 'master' term in 'test' directory (#3283)
* Replace internal usages of 'master' terminology in server/src/internalClusterTest directory

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

* Replace 'master' terminology with 'cluster manager' in test directory

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

* Replace 'master' terminology with 'cluster manager' in server/src/internalClusterTest directory

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

* Adjust format by spotlessApply task

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

* Replace 'master' terminology with 'cluster manager' in test directory

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

* Adjust format by spotlessApply task

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-05-11 19:34:57 -04: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
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 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
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
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
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
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
Tianli Feng b45bfc9afc
Revert "Make High-Level-Rest-Client tests allow deprecation warning temporarily, during deprecation of request parameter 'master_timeout' (#2702)" (#2744)
This reverts commit 6a2a33d187.

During the process of deprecating REST API request parameter master_timeout and adding alternative parameter cluster_manager_timeout, I made High-Level-Rest-Client tests allow deprecation warning temporarily, by changing the argument of `setStrictDeprecationMode()` to false when building `RestClient` for tests, in the above commit / PR https://github.com/opensearch-project/OpenSearch/pull/2702,

This PR sets the High-Level-Rest-Client tests back to treating warning header as a failure.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-19 13:39:42 -07:00
dependabot[bot] 002e614ecf
Bump hadoop-minicluster from 3.3.1 to 3.3.2 in /test/fixtures/hdfs-fixture (#2381)
* Bump hadoop-minicluster in /test/fixtures/hdfs-fixture

Bumps hadoop-minicluster from 3.3.1 to 3.3.2.

---
updated-dependencies:
- dependency-name: org.apache.hadoop:hadoop-minicluster
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Fixing gradle check

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vacha Shah <vachshah@amazon.com>
2022-04-18 11:27:19 -07:00
Vacha Shah fc378c7256
Adding asm to version file and upgrading (#2933)
Signed-off-by: Vacha Shah <vachshah@amazon.com>
2022-04-18 10:07:14 -07:00
Owais Kazi 3c5d997a76
Added a new line linter (#2875)
* Added linter to add new line

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Fixed new lines

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Ignore empty files

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Updated DEVELOPER GUIDE

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Renamed workflow file

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Fixed failing tests

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2022-04-13 14:14:18 -04:00
dependabot[bot] 81e2455df1
Bump asm-analysis from 9.2 to 9.3 in /test/logger-usage (#2829)
Bumps asm-analysis from 9.2 to 9.3.

---
updated-dependencies:
- dependency-name: org.ow2.asm:asm-analysis
  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-11 11:47:50 -04:00
Yoann Rodière b5d5616d44
Update commons-logging to 1.2 (#2806)
* Upgrade to Apache Commons Logging 1.2

Signed-off-by: Yoann Rodière <yoann@hibernate.org>

* Clarify that Apache HTTP/commons-* dependencies are not just for tests

Signed-off-by: Yoann Rodière <yoann@hibernate.org>
2022-04-08 16:43:51 -04:00
Tianli Feng 47a22bb08d
Replace remaining 'blacklist' with 'denylist' in internal class and method names (#2784)
* Replace blacklist with denylist in BlacklistedPathPatternMatcher

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

* Replace blacklist with denylist in assumption message

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

* Replace all Blacklisted with Denylisted

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

* Replace all blacklist(key) with denylist(key)

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

* Adjust format by spotlessApply task

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-07 15:45:20 -07:00
Andriy Redko 0244b2a2df
Update azure-storage-blob to 12.15.0: fix test flakiness (#2795)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-04-06 16:28:14 -05:00
Tianli Feng ed040e9f1a
Replace blacklist in Gradle build environment configuration (#2752)
- Replace `blacklist` with `denylist` in all `tests.rest.blacklist` and `REST_TESTS_BLACKLIST`
Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-05 17:48:39 -07:00
Andriy Redko 1dbeda0f32
Update azure-storage-blob to 12.15.0 (#2774)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-04-05 18:49:42 -04:00
Wenjun Ruan 0b1f4a2069
Rename `file` to `dir` in Environment (#2730)
* Rename `file` to `dir` in Environment

Signed-off-by: ruanwenjun <wenjun@apache.org>

* Fix compile error

Signed-off-by: ruanwenjun <wenjun@apache.org>

* fix compile error

Signed-off-by: ruanwenjun <wenjun@apache.org>
2022-04-05 09:23:08 -04:00
Nick Knize cb238aae61
Bump version to 3.0.0 (#2556)
Bump version to 3.0.0

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-04 17:40:31 -05:00
Tianli Feng 6a2a33d187
Make Rest-High-Rest-Level tests allow deprecation warning temporarily, during deprecation of request parameter 'master_timeout' (#2702)
Temporarily build rest client with setStrictDeprecationMode(false) to allow 
deprecation warning in HLRC tests while master_timeout parameters is
being refactored.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-04-04 10:22:22 -05:00
Nick Knize 6c195abc59
[Main] Bump Version 2.0 to 2.1 (#2715)
Bumps from version 2.0 to 2.1

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-04-02 14:40:25 -05:00
Andriy Redko d8a1ba6912
[CVE-2020-36518] Update jackson-databind to 2.13.2.2 (#2599)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-29 12:24:37 -04:00
Vacha Shah 5dd75bb0aa
Removing SLM check in tests for OpenSearch versions (#2604)
Signed-off-by: Vacha Shah <vachshah@amazon.com>
2022-03-28 11:32:18 -05:00
Owais Kazi cc0e66b1dc
Replaced "master" terminology in Log message (#2575)
Changed the log message to cluster-manager from master

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2022-03-24 21:50:54 -05:00
Andriy Redko b6ca0d1f78
Concurrent Searching (Experimental) (#1500)
* Concurrent Searching (Experimental)

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

* Addressingf code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-24 14:20:31 -04:00
Andriy Redko 82fb7abb71
Introduce QueryPhaseSearcher extension point (SearchPlugin) (#1931)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-03-21 23:11:23 -05:00
dependabot[bot] 8737b677a0
Bump asm-analysis from 7.1 to 9.2 in /test/logger-usage (#2273)
Bumps asm-analysis from 7.1 to 9.2.

---
updated-dependencies:
- dependency-name: org.ow2.asm:asm-analysis
  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-21 15:05:26 -04:00
Tianli Feng ea31483126
Add a new node role 'cluster_manager' as the alternative for 'master' role and deprecate 'master' role (#2424)
Add a new node role `cluster_manager`, as the replacement for `master` role, that used in setting `node.roles: [ master ]`. 
They have got the same functionality, but can NOT be assigned to `node.roles` together.
* Add `CLUSTER_MANAGER_ROLE` in `DiscoveryNodeRole` class, and deprecate `MASTER_ROLE`
* Remove `MASTER_ROLE` from the `DiscoveryNodeRole.BUILT_IN_ROLES`, and temporarily load the role by the existing method `DiscoveryNode.setAdditionalRoles`
* Add a method `validateRole()` in `DiscoveryNodeRole` class, it's used to validate a specific role is compatible with the other roles to be assigned to a node together.
* Add deprecation message when assigning `master` role in setting `node.roles`
* Replace most `MASTER_ROLE` with `CLUSTER_MANAGER_ROLE` in current unit and integration tests
* Add new unit and integration tests to validate `CLUSTER_MANAGER_ROLE` and `MASTER_ROLE` can be treated as the same.

More explanation:
* New node will have "cluster_manager", "data", and "ingest" roles by default. Which means the default value of setting "node.roles" will be `["cluster_manager","data","ingest"]`, instead of `["master","data","ingest"]`
* "cluster_manager" role will be treated as "master" role in the OpenSearch node of previous versions.
* "cluster_manager” role and "master" role have got the same abbreviation name: "m"

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-03-18 15:06:06 -07:00
Tianli Feng 1193ec101b
Deprecate setting 'cluster.no_master_block' and introduce the alternative setting 'cluster.no_cluster_manager_block' (#2453)
* Add a new setting `cluster.no_cluster_manager_block`, aims to replace the existing `cluster.no_master_block`
* Set the value of the old setting `cluster.no_master_block` as the fallback to the new setting
* Deprecate the existing `setting cluster.no_master_block`
* Add unit tests

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-03-18 14:57:08 -07:00
Tianli Feng 19eadb46ba
Deprecate setting 'cluster.initial_master_nodes' and introduce the alternative setting 'cluster.initial_cluster_manager_nodes' (#2463)
* Deprecate setting cluster.initial_master_nodes, and add setting cluster.initial_cluster_manager_nodes

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2022-03-18 14:55:49 -07:00
Nick Knize b9f04405d6
[Remove] types from CreateIndexRequest and companion Builder's mapping method (#2498)
Removes the type variable as input to CreateIndexRequest.mapping(Object...)
along with the CreateIndexRequestBuilder helper class. This also refactors the
method name to setMapping for consistency with other methods (e.g.,
setSettings).

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-17 18:13:27 -05:00
Nick Knize 2e3d3fef13
[Remove] Type from PutIndexTemplateRequest and PITRB (#2497)
Continues removal of types from PutIndexTemplateRequest and
PutIndexTemplateRequestBuilder.mapping. Delegated mapping method in
PutIndexTemplateRequestBuilder is refactored to setMapping for consistency with
similar methods (e.g., setSettings, setAliases).

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-17 12:05:24 -05:00
Nick Knize 3675400b92
[Remove] type from CIR.mapping and CIRB.mapping (#2478)
First pass to remove types from CreateIndexRequest and CreateIndexRequestBuilder
mapping method. This method is overloaded several times so the most widely used
methods in the RequestBuilder are refactored from mapping to setMapping to avoid
confusion, conflicts, and to be consistent with other method names (e.g.,
setSettings, setCause, setAlias).

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-16 17:35:08 -05:00
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
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
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