Commit Graph

6007 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Suraj Singh 3d5aff4b91
Remove type end-points from search and related APIs (#2263)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-03-02 13:21:00 -08:00
Nick Knize 897f4e7295
[Remove] deprecated getMapping API from IndicesClient (#2262)
Removes the deprecated types based get, getMapping, getAsync, and
getMappingAsync methods from IndicesClient. It also removes extra nesting of
mappings belong the deprecated type named object and removes the types based
methods from the affected request classes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-03-02 13:44:04 -06:00
Breno Faria 4b89410055
Reintroduce negative epoch_millis #1991 (#2232)
* Reintroduce negative epoch_millis #1991

Fixes a regression introduced with Elasticsearch 7 regarding the date
field type that removed support for negative timestamps with sub-second
granularity.

Thanks to Ryan Kophs (https://github.com/rkophs) for allowing me to use
his previous work.

Signed-off-by: Breno Faria <breno.faria@intrafind.de>

* applying spotless fix

Signed-off-by: Breno Faria <breno.faria@intrafind.de>

* more conservative implementation of isSupportedBy

Signed-off-by: Breno Faria <breno.faria@intrafind.de>

* adding braces to control flow statement

Signed-off-by: Breno Faria <breno.faria@intrafind.de>

* spotless fix...

Signed-off-by: Breno Faria <breno.faria@intrafind.de>

Co-authored-by: Breno Faria <breno.faria@intrafind.de>
2022-03-02 12:52:38 -06:00
Nick Knize 0bd7850bed
[Remove] remaining type usage in Client and AbstractClient (#2258)
Removes type parameter from remaining prepareIndex in Client and AbstractClient.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-25 13:35:48 -06:00
Suraj Singh 5b0da85df8
Remove type from validate query API (#2255)
* Remove type mapping from RestValidateAction

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

* Spotless check apply

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

* Include suggested review comment

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-02-25 10:18:41 -08:00
Nick Knize 8b48207540
[Remove] Type from Client.prepare(Index,Delete,Update) (#2253)
Removes the type parameter from Client.prepare(Index,Delete,Update) and
everywhere it's used throughout the codebase except for prepareIndex(index,
type, id) which is removed in a follow up.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-24 21:20:03 -06:00
Matt Weber 9f6e2e56e0
Update bwc verions for (#2237) (#2248)
Update the bwc versions for #2237 since it was backported to 1.3.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-02-24 16:14:49 -08:00
Nick Knize d892c51d66
[Remove] Types from DocWrite Request and Response (#2239)
Removes type support from DocWrite Request and Response, all derived classes,
and all places used.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-24 15:57:44 -06:00
Matt Weber 37235fafd9
Case Insensitive Support in Regexp Interval (#2237)
Add a `case_insensitive` flag to regexp interval source.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-02-24 14:54:13 -06:00
dependabot[bot] 788ba99915
Bump forbiddenapis from 2.7 to 3.2 in /buildSrc/src/testKit/thirdPartyAudit (#2185)
* Bump forbiddenapis in /buildSrc/src/testKit/thirdPartyAudit

Bumps [forbiddenapis](https://github.com/policeman-tools/forbidden-apis) from 2.7 to 3.2.
- [Release notes](https://github.com/policeman-tools/forbidden-apis/releases)
- [Commits](https://github.com/policeman-tools/forbidden-apis/compare/2.7...3.2)

---
updated-dependencies:
- dependency-name: de.thetaphi:forbiddenapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Fixing failing 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-02-24 11:27:44 -08:00
Suraj Singh cbfcad9054
Removes type mappings from mapping APIs (#2238)
Removes type mappings from GetMapping, GetFieldMapping and PutMapping APIs

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-02-24 11:23:36 -08:00
Nick Knize 3445befd36
[Remove] types from SearchHit and Explain API (#2205)
* [Remove] types from SearchHit and Explain API

Removes type support from SearchHit and Explain API.

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

* fix failing tests

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

* move TYPES_DEPRECATION_MESSAGE from RestExplainAction to FullClusterRestartIT

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

* fix FullClusterRestartIT

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

* fix failing tests

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

* fix testSoftDelete

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-23 11:40:30 -08:00
Nick Knize 1b571ece28
[Remove] type support from Bulk API (#2215)
Removes all support for type parameter from the Bulk API.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-23 11:53:27 -06:00
Nick Knize 44441d8fc5
Always use Lucene index in peer recovery (#2077)
With soft deletes no longer optional, peer recovery is switched to always use the
lucene index instead of replaying operations from the translog.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-23 11:05:40 -06:00
Suraj Singh 52eaf96a88
[Remove] Type mapping parameter from document update API (#2204)
* Remove type param from yml and integ test files

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

* Remove type mapping specific update API

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-02-22 11:54:03 -08:00
Nick Knize c9f7c37367
[Remove] Type Specific Index Stats (#2198)
Removes type specific index stats since only one type is allowed.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-21 16:06:43 -06:00
Nick Knize 2e3f410957
[Remove] Types from GET/MGET (#2168)
Removes type support from the get and mget transport and rest actions along
with removal from ShardGetService.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-21 11:37:27 -06:00
Matt Weber fc22350208
Update #2103 BWC Versions (#2173)
Change BWC checks to 1.3 since #2103 was backported.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-02-18 12:15:11 -06:00
Ankit Jain 8ae0db5285
Adding shards per node constraint for predictability to testClusterGr… (#2110)
* Adding shards per node constraint for predictability to testClusterGreenAfterPartialRelocation

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>

* Fixing precommit violation

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>

* Adding assertion to ensure invariant

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
2022-02-18 10:52:27 -06:00
Nick Knize b75d3f1123
[Remove] Default Mapping (#2151)
Default mappings were deprecated in Legacy version 6x and cannot be added to
indexes created in legacy 7+ or any version of OpenSearch. All support for
default mappings are removed for OpenSearch 2+.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-17 22:21:20 -06:00
Nick Knize 7fe642fda5
[Remove] Type from Search Internals (#2109)
With types deprecation the type support is removed from internal search API
(SearchRequest and QueryShardContext).

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-17 16:17:31 -06:00
Matt Weber cfd96e3e4b
Support unordered non-overlapping intervals (#2103)
* Support unordered non-overlapping intervals

This commit exposes Intervals.unorderedNoOverlaps (LUCENE-8828).

Signed-off-by: Matt Weber <matt@mattweber.org>

* Replace ordered and overlap flags with enum.

- add IntervalMode enum
- deprecate ordered
- bwc between IntervalMode and ordered flag
- update tests
- update rest tests

Signed-off-by: Matt Weber <matt@mattweber.org>

* fix annotated text plugin test

Signed-off-by: Matt Weber <matt@mattweber.org>

* bwc to 2x only

Signed-off-by: Matt Weber <matt@mattweber.org>

* BWC rest tests for ordered flag

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-02-17 17:10:22 -05:00
Peng Huo 9ea25c4f2e
Adjust main version after backport to 1.x (#2147)
Signed-off-by: Peng Huo <penghuo@gmail.com>
2022-02-17 12:17:10 -06:00
dependabot[bot] 9689a27b63
Bump com.diffplug.spotless from 5.6.1 to 6.2.0 (#1919)
* Bump com.diffplug.spotless from 5.6.1 to 6.2.0

Bumps com.diffplug.spotless from 5.6.1 to 6.2.0.

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

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

* spotlessApply

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-16 22:08:40 -08:00
Nick Knize c0c7d7aedb
[Remove] Type parameter from TermVectors API (#2104)
Remove document type support from the TermVectors API.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-15 14:49:08 -06:00
Andriy Redko 6b6f03368f
Mapping update for “date_range” field type is not idempotent (#2094)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-02-14 16:56:02 -06:00
Andriy Redko a942b275ef
Fixing org.opensearch.monitor.os.OsProbeTests::testLogWarnCpuMessageOnlyOnes when CGroups are not available (#2101)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-02-14 12:10:16 -05:00
Andrey Pleskach 27ed6fc82c
Fix integration tests failure (#2067)
Fixed integration tests failure on Linux with Kernel 5.16.x

Signed-off-by: Andrey Pleskach <ples@aiven.io>
2022-02-11 09:40:04 -05:00
Suraj Singh 892801a074
Remove type mapping from document index API (#2026)
* Remove doc type specific indexing APIs and relevant changes

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

* Remove type param from yml and integ test files

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-02-09 13:34:10 -06:00
Ankit Jain f0984eb409
Added timeout to ensureGreen() for testClusterGreenAfterPartialRelocation (#2074)
Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
2022-02-09 00:55:30 -08:00
Nick Knize 6428d1a2a6
[Refactor] MapperService to QueryShardContext in valueFetcher (#2027)
* [Refactor] MapperService to QueryShardContext in valueFetcher

QueryShardContext encapsulates MapperService along with other mechanisms useful
for analyzers, highlighters, and readers. This commit refactors the valueFetcher
to use the QueryShardContext as a parameter instead of direct access to the
MapperService. This is an API change. Behavior of the method is unaffected.

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

* change unnecessary Optional usage

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

* spotlessApply

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-08 08:38:20 -05:00
Ankit Jain 343b82fe24
Stabilizing org.opensearch.cluster.routing.MovePrimaryFirstTests.test… (#2048)
* Stabilizing org.opensearch.cluster.routing.MovePrimaryFirstTests.testClusterGreenAfterPartialRelocation

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>

* Removing unused import

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>

* Making code more readable

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
2022-02-07 19:10:07 -08:00
Matt Weber b9420d8f70
Add regexp interval source (#1917)
* Add regexp interval source

Add a regexp interval source provider so people can use regular
expressions inside of intervals queries.

Signed-off-by: Matt Weber <matt@mattweber.org>

* Fixes

- register regexp interval in SearchModule
- use fully-qualified name for lucene RegExp
- get rid of unnecessary variable

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-02-07 17:18:43 -06:00
Nick Knize 8288c9010c
[Remove] CircuitBreaker Accounting (#2056)
RAM Accounting of segments is removed so remove the associated Accounting
circuit breaker.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-04 19:46:27 -06:00
Nicholas Walter Knize ee9e5ba579
Add Version.V_1_2_5 constant
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-04 18:21:51 -06:00
Nick Knize 25955782b9
[Refactor] Lucene DataInput and DataOutput to StreamInput and StreamOutput (#2035)
Lucene 9 changes from BigEndian to LittleEndian in DataInput and DataOutput.
The use of Lucene's Data IO classes are refactored in this commit to use
StreamInput which maintains the same method calls while preserving the byte
order of the data.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-04 14:23:18 -06:00
Nick Knize fc0d3a368d
[Remove] Segment memory estimation and tracking (#2029)
Lucene 9 removed CodecReader#ramBytesUsed and all file formats that no longer
consume large amounts of memory. As a result RAM estimation for segments is no
longer possible and is removed by this commit. backwards compatibility is retained 
for the tranport layer.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-02-04 13:47:48 -06:00
Peng Huo 2fc8acd409
Fix composite aggregation failed test cases introduce by missing_order parameter (#1942) (#2005)
Fix composite aggregation failed test cases introduce by missing_order parameter by using MissingOrder to decide null values's order in InternalBucket.

Signed-off-by: Peng Huo <penghuo@gmail.com>
2022-02-01 14:19:10 -06:00
Lukáš Vlček a597d4daac
Fixing invalid Java code example in JavaDoc (#2008)
Including several other minor typos in JavaDoc.

Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
2022-01-30 16:31:42 -08:00
Nick Knize 5569ce0025
[Remove] index.merge.policy.max_merge_at_once_explicit (#1988)
Remove deprecated max_merge_at_once_explicit parameter since it has been
removed in lucene 9 and deprecated in opensearch 1.3

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-27 14:05:13 -06:00
Nick Knize 334f0d9908
[Remove] Setting explicit version on analysis component (#1986)
Lucene 9 removes the ability to define an explicit version on an analysis
component so remove the the version parameter and deprecation warning
prohibiting users from explicitly setting versioned analyzers.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-27 14:04:26 -06:00
Owais Kazi 054595b140
Added timeout to ensureGreen() for testClusterGreenAfterPartialRelocation (#1983)
* Added timeout to ensureGreen() for testClusterGreenAfterPartialRelocation

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

* Fixed spotless imports

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2022-01-27 09:26:32 -08:00
Nick Knize 0791c88af1
[Remove] Deprecated Synced Flush API (#1761)
Remove the deprecated sync flush API which was replaced by sequence
number and retention lease mechanisms and no longer used in 2.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-26 22:18:48 -06:00
Nick Knize 0f3b72b7bb
[Deprecate] Setting explicit version on analysis component (#1978)
Lucene 9 removes the ability to define an explicit version on an analysis 
component. The version parameter is deprecated at parse time and a warning is 
issued 
to the user through the deprecation logger.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-26 20:46:28 -06:00
Nick Knize a18b4e35b8
[Deprecate] index.merge.policy.max_merge_at_once_explicit (#1981)
max_merge_at_once_explicit is removed in lucene 9 so the index setting is
deprecated for removal in the next major release.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-26 20:33:52 -06:00
Matt Weber 0bc30b4314
Wildcard max_expansion version check update (#1980)
Change from 2x to 1.3 for wildcard interval max_expansion version check
since #1916 was backported.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-01-26 18:43:20 -06:00
Peng Huo 7a9314a3bb
Support _first and _last parameter for missing bucket ordering in composite aggregation (#1942)
Adds support for _first and _last parameters for missing bucket ordering in composite aggregation. 
By default, if order is asc, missing_bucket at first, if order is desc, missing_bucket at last. If 
missing_order is "_first" or "_last", regardless order, missing_bucket is at first or last respectively.

Signed-off-by: Peng Huo <penghuo@gmail.com>
2022-01-26 16:36:50 -06:00
Saurabh Singh 447b20c457
Delay the request size calculation until required by the indexing pressure framework (#1592)
Logically delay the request size calculation until it's absolutely required by the 
indexing pressure framework.

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
2022-01-26 15:06:01 -06:00
Rishikesh Pasham 3f92aecddf
Enabling Sort Optimization to make use of Lucene (#1974)
Remove sort optimization. From Lucence 8.10.1, Numeric sort optimization is 
already done in Lucene Comparators. Lucene also supports sort optimization 
with search_after queries.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
2022-01-26 14:36:07 -06:00
Matt Weber 3b8db91abe
Add max_expansions option to wildcard interval (#1916)
Add support for setting the max expansions on a wildcard interval.
The default value is still 128 and the max value is bounded by
`BooleanQuery.getMaxClauseCount()`.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-01-26 13:06:39 -06:00
Nick Knize 57ac788bb6
[Refactor] InternalEngine to always use soft deletes (#1933)
Soft Deletes have been enabled by default since Legacy version 7.0 and made
mandatory in Version 2.0.0. This commit refactors the InternalEngine to always
use soft-deletes. It is a follow on to making soft deletes mandatory in 2.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-26 12:28:24 -06:00
Venkata Jyothsna Donapati 02c6a7f156
Prefer adaptive replica selection over awareness attribute based routing (#1107)
* Prefer adaptive replica selection over awareness attribute based routing

Signed-off-by: jyothsna <donapv@amazon.com>

* Minor changes

Signed-off-by: jyothsna <donapv@amazon.com>

* Address review comments

Signed-off-by: jyothsna <donapv@amazon.com>

* Fix checkstyle

Signed-off-by: jyothsna <donapv@amazon.com>

* Minor fix

Signed-off-by: jyothsna <donapv@amazon.com>
2022-01-21 11:11:49 -06:00
Sarat Vemulapalli 781156471a
Removing lingering transportclient (#1955)
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2022-01-21 01:00:50 -08:00
Suraj Singh 27e05cc1dc
[BUG] Wait for outstanding requests to complete in LastSuccessfulSett… (#1939)
* [BUG] Wait for outstanding requests to complete in LastSuccessfulSettingsUpdate test

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

* [BUG] Wait for outstanding requests to complete in LastSuccessfulSettingsUpdate test

Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-01-20 17:26:53 -06:00
Ankit Jain 6eb8f6f307
Prioritize primary shard movement during shard allocation (#1445)
When some node or set of nodes is excluded (based on some cluster setting) 
BalancedShardsAllocator iterates over them in breadth first order picking 1 shard from 
each node and repeating the process until all shards are balanced. Since shards from 
each node are picked randomly it's possible the p and r of shard1 is relocated first 
leaving behind both p and r of shard2. If the excluded nodes were to go down the 
cluster becomes red. 

This commit introduces a new setting  "cluster.routing.allocation.move.primary_first" 
that prioritizes the p of both shard1 and shard2 first so the cluster does not become 
red if the excluded nodes were to go down before relocating other shards. Note that
with this setting enabled performance of this change is a direct function of number 
of indices, shards, replicas, and nodes. The larger the indices, replicas, and 
distribution scale, the slower the allocation becomes. This should be used with care.

Signed-off-by: Ankit Jain <jain.ankitk@gmail.com>
2022-01-20 17:02:54 -06:00
Nick Knize 7058256e45
Enforce soft deletes (#1903)
This commit enforces soft deletes as required in 2.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-18 12:54:42 -06:00
Suraj Singh 7691f075cb
[Bug] Wait for outstanding requests to complete (#1925)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
2022-01-18 10:49:47 -05:00
Nick Knize 81d998dd7a
[BWC] Ensure 2.x compatibility with Legacy 7.10.x (#1902)
* [BWC] Ensure 2.x compatibility with Legacy 7.10.x

This commit fixes TransportHandshaker to send a spoofed Legacy 7.10.2 mincompat
version to ensure OpenSearch 2.x nodes can join a Legacy 7.10.x cluster for
rolling upgrade support. Without this change 7.10.x and OpenSearch 2.x mixed
cluster bwc tests would fail.

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

* fix AbstractSimpleTransportTestCase failures

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

* change v3 to local static

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

* make V_3_0_0 package private and reuse in test

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-17 12:26:28 -05:00
Andriy Redko dd8ad29770
Fixing org.opensearch.common.network.InetAddressesTests.testForStringIPv6WithScopeIdInput (#1913)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-01-14 15:23:33 -06:00
Matt Weber 524448fc41
Expand SearchPlugin javadocs. (#1909)
Add and clarify some search plugin point documentation.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-01-14 13:06:32 -06:00
Andriy Redko f059738aac
[BUG] Serialization bugs can cause node drops (#1885)
This commit restructures InboundHandler to ensure all data 
is consumed over the wire.

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-01-14 13:02:34 -06:00
Matt Weber e7d44c20e9
Make SortBuilders pluggable (#1856)
Add the ability for plugin authors to add custom sort builders.

Signed-off-by: Matt Weber <matt@mattweber.org>
2022-01-14 11:06:13 -06:00
Nick Knize 0887ac6d92
[Remove] Old Translog Checkpoint Format (#1884)
This commit removes support for old translog checkpoint formats prior to 7.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2022-01-11 12:58:35 -06:00
Rabi Panda 40442aae7f
Remove unwanted unreleased versions (#1877)
Only last major (2.0.0), last minor(1.3.0) and (1.2.4) can be unreleased

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2022-01-11 09:19:24 -05:00
Rabi Panda 28f688fbc5
Use Version.compareMajor instead of using equals operator (#1876)
This test fails due to equality check of majors between OpenSearch Version 1.x and LegacyESVersion 7.x. They should be equivalent but in this case the check fails and LegacyVersion.v6.8.x is chosen which was removed in 52508d5.

This change fixes the comparison logic by using `Version.compareMajor` method instead.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2022-01-10 17:59:08 -08:00
Andriy Redko 4dbf1d268c
Concurrent Searching (Experimental): modify profiling implementation to support concurrent data collection (#1673)
* Concurrent Searching (Experimental): modify profiling implementation to support concurrent data collection

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

* Addressing code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-01-10 17:11:48 -06:00
Rabi Panda ec24ee56e8
Remove deprecated search.remote settings (#1870)
This commit removes the deprecated search.remote.* settings.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2022-01-10 11:45:56 -06:00
Rabi Panda 52508d57f5
Remove LegacyESVersion.V_6_8_x constants (#1869)
This commit removes all usages of the `LegacyESVersion.V_6_8_x` constants from the codebase.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2022-01-10 11:43:15 -06:00
Andriy Redko c71ff87303
Fixing build failures after Flavor Serialization backport (#1867)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-01-07 16:43:56 -08:00
sharp-pixel 1bb8864178
Add darwin-arm64-tar and no-jdk-darwin-arm64-tar archive distributions. (#1668)
* Add darwin-arm64-tar and no-jdk-darwin-arm64-tar archive distributions.

Signed-off-by: Cédric Pelvet <cedric.pelvet@gmail.com>

* Fix dangling HTML tags in javadoc to solve build issues with JDK 17.

Signed-off-by: Cédric Pelvet <cedric.pelvet@gmail.com>
2022-01-06 12:39:13 -05:00
Andriy Redko 385b268bc0
Update Mockito to 4.2.x (#1830)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-01-03 12:00:45 -05:00
Rabi Panda 06cbc47136
Remove LegacyESVersion.V_6_7_x constants (#1807)
This commit removes all usages of the `LegacyESVersion.V_6_7_x` constants from the codebase.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2022-01-02 14:09:55 -08:00