Skip to content

Commit 89ce8f1

Browse files
authored
Merge branch 'main' into hello1
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
2 parents 06b7e85 + d06926c commit 89ce8f1

File tree

816 files changed

+11189
-8457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

816 files changed

+11189
-8457
lines changed

.github/workflows/precommit.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1-
name: Gradle Precommit
1+
name: Gradle Precommit and Asssemble
22
on: [pull_request]
33

44
jobs:
55
precommit:
66
runs-on: ${{ matrix.os }}
77
strategy:
88
matrix:
9-
os: [windows-latest, macos-latest] # precommit on ubuntu-latest is run as a part of the gradle-check workflow
9+
os: [ubuntu-latest, windows-latest, macos-latest]
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
- name: Set up JDK 11
13-
uses: actions/setup-java@v2
13+
uses: actions/setup-java@v3
1414
with:
1515
java-version: 11
16-
distribution: adopt
17-
- name: Run Gradle
16+
distribution: temurin
17+
cache: gradle
18+
- name: Run Gradle (precommit)
1819
run: |
1920
./gradlew javadoc precommit --parallel
21+
- name: Setup docker (missing on MacOS)
22+
if: runner.os == 'macos'
23+
run: |
24+
brew install docker
25+
colima start
26+
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
27+
- name: Run Gradle (assemble)
28+
run: |
29+
./gradlew assemble --parallel

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
- Add getter for path field in NestedQueryBuilder ([#4636](https://github.com/opensearch-project/OpenSearch/pull/4636))
1010
- Allow mmap to use new JDK-19 preview APIs in Apache Lucene 9.4+ ([#5151](https://github.com/opensearch-project/OpenSearch/pull/5151))
1111
- Add events correlation engine plugin ([#6854](https://github.com/opensearch-project/OpenSearch/issues/6854))
12+
- Introduce new dynamic cluster setting to control slice computation for concurrent segment search ([#9107](https://github.com/opensearch-project/OpenSearch/pull/9107))
1213

1314
### Dependencies
1415
- Bump `log4j-core` from 2.18.0 to 2.19.0
@@ -49,6 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4950
- [Remote Store] Add support to restore only unassigned shards of an index ([#8792](https://github.com/opensearch-project/OpenSearch/pull/8792))
5051
- Replace the deprecated IndexReader APIs with new storedFields() & termVectors() ([#7792](https://github.com/opensearch-project/OpenSearch/pull/7792))
5152
- [Remote Store] Restrict user override for remote store index level settings ([#8812](https://github.com/opensearch-project/OpenSearch/pull/8812))
53+
- Removed blocking wait in TransportGetSnapshotsAction which was exhausting generic threadpool ([#8377](https://github.com/opensearch-project/OpenSearch/pull/8377))
5254
- Return 409 Conflict HTTP status instead of 503 on failure to concurrently execute snapshots ([#8986](https://github.com/opensearch-project/OpenSearch/pull/5855))
5355

5456
### Deprecated
@@ -83,13 +85,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8385
- [distribution/archives] [Linux] [x64] Provide the variant of the distributions bundled with JRE ([#8195]()https://github.com/opensearch-project/OpenSearch/pull/8195)
8486
- Add configuration for file cache size to max remote data ratio to prevent oversubscription of file cache ([#8606](https://github.com/opensearch-project/OpenSearch/pull/8606))
8587
- Disallow compression level to be set for default and best_compression index codecs ([#8737]()https://github.com/opensearch-project/OpenSearch/pull/8737)
88+
- Prioritize replica shard movement during shard relocation ([#8875](https://github.com/opensearch-project/OpenSearch/pull/8875))
89+
- Introducing Default and Best Compression codecs as their algorithm name ([#9123]()https://github.com/opensearch-project/OpenSearch/pull/9123)
8690

8791
### Dependencies
8892
- Bump `org.apache.logging.log4j:log4j-core` from 2.17.1 to 2.20.0 ([#8307](https://github.com/opensearch-project/OpenSearch/pull/8307))
89-
- Bump `io.grpc:grpc-context` from 1.46.0 to 1.56.1 ([#8726](https://github.com/opensearch-project/OpenSearch/pull/8726))
93+
- Bump `io.grpc:grpc-context` from 1.46.0 to 1.57.1 ([#8726](https://github.com/opensearch-project/OpenSearch/pull/8726), [#9145](https://github.com/opensearch-project/OpenSearch/pull/9145))
9094
- Bump `com.netflix.nebula:gradle-info-plugin` from 12.1.5 to 12.1.6 ([#8724](https://github.com/opensearch-project/OpenSearch/pull/8724))
9195
- Bump `commons-codec:commons-codec` from 1.15 to 1.16.0 ([#8725](https://github.com/opensearch-project/OpenSearch/pull/8725))
92-
- Bump `org.apache.zookeeper:zookeeper` from 3.8.1 to 3.8.2 ([#8844](https://github.com/opensearch-project/OpenSearch/pull/8844))
96+
- Bump `org.apache.zookeeper:zookeeper` from 3.8.1 to 3.9.0 ([#8844](https://github.com/opensearch-project/OpenSearch/pull/8844), [#9146](https://github.com/opensearch-project/OpenSearch/pull/9146))
9397
- Bump `org.gradle.test-retry` from 1.5.3 to 1.5.4 ([#8842](https://github.com/opensearch-project/OpenSearch/pull/8842))
9498
- Bump `com.netflix.nebula.ospackage-base` from 11.3.0 to 11.4.0 ([#8838](https://github.com/opensearch-project/OpenSearch/pull/8838))
9599
- Bump `com.google.http-client:google-http-client-gson` from 1.43.2 to 1.43.3 ([#8840](https://github.com/opensearch-project/OpenSearch/pull/8840))
@@ -101,16 +105,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
101105
- Bump `com.maxmind.geoip2:geoip2` from 4.0.1 to 4.1.0 ([#8998](https://github.com/opensearch-project/OpenSearch/pull/8998))
102106
- Bump `org.apache.commons:commons-lang3` from 3.12.0 to 3.13.0 in /plugins/repository-hdfs ([#8997](https://github.com/opensearch-project/OpenSearch/pull/8997))
103107
- Bump `netty` from 4.1.94.Final to 4.1.96.Final ([#9030](https://github.com/opensearch-project/OpenSearch/pull/9030))
108+
- Bump `io.projectreactor.netty:reactor-netty-http` from 1.1.8 to 1.1.9 ([#9147](https://github.com/opensearch-project/OpenSearch/pull/9147))
109+
- Bump `org.apache.maven:maven-model` from 3.9.3 to 3.9.4 ([#9148](https://github.com/opensearch-project/OpenSearch/pull/9148))
104110

105111
### Changed
106112
- Perform aggregation postCollection in ContextIndexSearcher after searching leaves ([#8303](https://github.com/opensearch-project/OpenSearch/pull/8303))
107113
- Make Span exporter configurable ([#8620](https://github.com/opensearch-project/OpenSearch/issues/8620))
108114
- Change InternalSignificantTerms to sum shard-level superset counts only in final reduce ([#8735](https://github.com/opensearch-project/OpenSearch/pull/8735))
109115
- Exclude 'benchmarks' from codecov report ([#8805](https://github.com/opensearch-project/OpenSearch/pull/8805))
116+
- Adds support for tracing runnable scenarios ([#8831](https://github.com/opensearch-project/OpenSearch/pull/8831))
110117
- [Refactor] MediaTypeParser to MediaTypeParserRegistry ([#8636](https://github.com/opensearch-project/OpenSearch/pull/8636))
111118
- Create separate SourceLookup instance per segment slice in SignificantTextAggregatorFactory ([#8807](https://github.com/opensearch-project/OpenSearch/pull/8807))
112119
- Add support for aggregation profiler with concurrent aggregation ([#8801](https://github.com/opensearch-project/OpenSearch/pull/8801))
113120
- [Remove] Deprecated Fractional ByteSizeValue support #9005 ([#9005](https://github.com/opensearch-project/OpenSearch/pull/9005))
121+
- Make MultiBucketConsumerService thread safe to use across slices during search ([#9047](https://github.com/opensearch-project/OpenSearch/pull/9047))
122+
- Change shard_size and shard_min_doc_count evaluation to happen in shard level reduce phase ([#9085](https://github.com/opensearch-project/OpenSearch/pull/9085))
114123

115124
### Deprecated
116125

MAINTAINERS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
66

77
| Maintainer | GitHub ID | Affiliation |
88
|--------------------------| ------------------------------------------------------- | ----------- |
9+
| Abbas Hussain | [abbashus](https://github.com/abbashus) | Meta |
910
| Anas Alkouz | [anasalkouz](https://github.com/anasalkouz) | Amazon |
1011
| Andrew Ross | [andrross](https://github.com/andrross) | Amazon |
1112
| Andriy Redko | [reta](https://github.com/reta) | Aiven |
@@ -20,6 +21,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
2021
| Marc Handalian | [mch2](https://github.com/mch2) | Amazon |
2122
| Nick Knize | [nknize](https://github.com/nknize) | Amazon |
2223
| Owais Kazi | [owaiskazi19](https://github.com/owaiskazi19) | Amazon |
24+
| Rabi Panda | [adnapibar](https://github.com/adnapibar) | Independent |
2325
| Rishikesh Pasham | [Rishikesh1159](https://github.com/Rishikesh1159) | Amazon |
2426
| Ryan Bogan | [ryanbogan](https://github.com/ryanbogan) | Amazon |
2527
| Sachin Kale | [sachinpkale](https://github.com/sachinpkale) | Amazon |
@@ -33,8 +35,6 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
3335
## Emeritus
3436

3537
| Maintainer | GitHub ID | Affiliation |
36-
|-------------------------|---------------------------------------------| ----------- |
37-
| Abbas Hussain | [abbashus](https://github.com/abbashus) | Amazon |
38+
|-------------------------|---------------------------------------------|-------------|
3839
| Megha Sai Kavikondala | [meghasaik](https://github.com/meghasaik) | Amazon |
39-
| Rabi Panda | [adnapibar](https://github.com/adnapibar) | Amazon |
4040
| Xue Zhou | [xuezhou25](https://github.com/xuezhou25) | Amazon |

benchmarks/src/main/java/org/opensearch/benchmark/search/aggregations/TermsReduceBenchmark.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import org.opensearch.search.aggregations.InternalAggregations;
5858
import org.opensearch.search.aggregations.MultiBucketConsumerService;
5959
import org.opensearch.search.aggregations.bucket.terms.StringTerms;
60+
import org.opensearch.search.aggregations.bucket.terms.TermsAggregator;
6061
import org.opensearch.search.aggregations.pipeline.PipelineAggregator;
6162
import org.opensearch.search.builder.SearchSourceBuilder;
6263
import org.opensearch.search.query.QuerySearchResult;
@@ -170,15 +171,14 @@ private StringTerms newTerms(Random rand, BytesRef[] dict, boolean withNested) {
170171
"terms",
171172
BucketOrder.key(true),
172173
BucketOrder.count(false),
173-
topNSize,
174-
1,
175174
Collections.emptyMap(),
176175
DocValueFormat.RAW,
177176
numShards,
178177
true,
179178
0,
180179
buckets,
181-
0
180+
0,
181+
new TermsAggregator.BucketCountThresholds(1, 0, topNSize, numShards)
182182
);
183183
}
184184

benchmarks/src/main/java/org/opensearch/benchmark/search/aggregations/bucket/terms/StringTermsSerializationBenchmark.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import org.openjdk.jmh.annotations.Setup;
5252
import org.openjdk.jmh.annotations.State;
5353
import org.openjdk.jmh.annotations.Warmup;
54+
import org.opensearch.search.aggregations.bucket.terms.TermsAggregator;
5455

5556
import java.util.ArrayList;
5657
import java.util.List;
@@ -86,15 +87,14 @@ private StringTerms newTerms(boolean withNested) {
8687
"test",
8788
BucketOrder.key(true),
8889
BucketOrder.key(true),
89-
buckets,
90-
1,
9190
null,
9291
DocValueFormat.RAW,
9392
buckets,
9493
false,
9594
100000,
9695
resultBuckets,
97-
0
96+
0,
97+
new TermsAggregator.BucketCountThresholds(1, 0, buckets, buckets)
9898
);
9999
}
100100

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ dependencies {
117117
api 'de.thetaphi:forbiddenapis:3.5.1'
118118
api 'com.avast.gradle:gradle-docker-compose-plugin:0.16.12'
119119
api "org.yaml:snakeyaml:${props.getProperty('snakeyaml')}"
120-
api 'org.apache.maven:maven-model:3.9.3'
120+
api 'org.apache.maven:maven-model:3.9.4'
121121
api 'com.networknt:json-schema-validator:1.0.86'
122122
api 'org.jruby.jcodings:jcodings:1.0.58'
123123
api 'org.jruby.joni:joni:2.2.1'

buildSrc/src/main/java/org/opensearch/gradle/docker/DockerSupportService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public abstract class DockerSupportService implements BuildService<DockerSupport
6868
// Defines the possible locations of the Docker CLI. These will be searched in order.
6969
private static String[] DOCKER_BINARIES_UNIX = { "/usr/bin/docker", "/usr/local/bin/docker" };
7070

71-
private static String[] DOCKER_BINARIES_WINDOWS = { System.getenv("PROGRAMFILES") + "\\Docker\\Docker\\resources\\bin\\docker.exe" };
71+
private static String[] DOCKER_BINARIES_WINDOWS = {
72+
System.getenv("PROGRAMFILES") + "\\Docker\\Docker\\resources\\bin\\docker.exe",
73+
System.getenv("SystemRoot") + "\\System32\\docker.exe" /* Github Actions */ };
7274

7375
private static String[] DOCKER_BINARIES = Os.isFamily(Os.FAMILY_WINDOWS) ? DOCKER_BINARIES_WINDOWS : DOCKER_BINARIES_UNIX;
7476

client/rest-high-level/src/main/java/org/opensearch/client/RequestConverters.java

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@
7676
import org.opensearch.core.common.bytes.BytesReference;
7777
import org.opensearch.common.lucene.uid.Versions;
7878
import org.opensearch.common.unit.TimeValue;
79-
import org.opensearch.common.util.CollectionUtils;
79+
import org.opensearch.core.common.util.CollectionUtils;
8080
import org.opensearch.common.xcontent.XContentHelper;
81-
import org.opensearch.common.xcontent.XContentType;
8281
import org.opensearch.core.common.Strings;
8382
import org.opensearch.core.xcontent.DeprecationHandler;
83+
import org.opensearch.core.xcontent.MediaTypeRegistry;
8484
import org.opensearch.core.xcontent.NamedXContentRegistry;
8585
import org.opensearch.core.xcontent.ToXContent;
8686
import org.opensearch.core.xcontent.XContent;
@@ -119,7 +119,7 @@
119119
* @opensearch.api
120120
*/
121121
final class RequestConverters {
122-
static final XContentType REQUEST_BODY_CONTENT_TYPE = XContentType.JSON;
122+
static final MediaType REQUEST_BODY_CONTENT_TYPE = MediaTypeRegistry.JSON;
123123

124124
private RequestConverters() {
125125
// Contains only status utility methods
@@ -177,7 +177,7 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
177177
}
178178

179179
if (bulkContentType == null) {
180-
bulkContentType = XContentType.JSON;
180+
bulkContentType = MediaTypeRegistry.JSON;
181181
}
182182

183183
final byte separator = bulkContentType.xContent().streamSeparator();
@@ -266,7 +266,12 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
266266
}
267267
}
268268
} else if (opType == DocWriteRequest.OpType.UPDATE) {
269-
source = XContentHelper.toXContent((UpdateRequest) action, bulkContentType, ToXContent.EMPTY_PARAMS, false).toBytesRef();
269+
source = org.opensearch.core.xcontent.XContentHelper.toXContent(
270+
(UpdateRequest) action,
271+
bulkContentType,
272+
ToXContent.EMPTY_PARAMS,
273+
false
274+
).toBytesRef();
270275
}
271276

272277
if (source != null) {
@@ -821,7 +826,8 @@ static HttpEntity createEntity(ToXContent toXContent, MediaType mediaType) throw
821826
}
822827

823828
static HttpEntity createEntity(ToXContent toXContent, MediaType mediaType, ToXContent.Params toXContentParams) throws IOException {
824-
BytesRef source = XContentHelper.toXContent(toXContent, mediaType, toXContentParams, false).toBytesRef();
829+
BytesRef source = org.opensearch.core.xcontent.XContentHelper.toXContent(toXContent, mediaType, toXContentParams, false)
830+
.toBytesRef();
825831
return new ByteArrayEntity(source.bytes, source.offset, source.length, createContentType(mediaType));
826832
}
827833

@@ -868,12 +874,12 @@ static String endpoint(String[] indices, String endpoint, String type) {
868874
}
869875

870876
/**
871-
* Returns a {@link ContentType} from a given {@link XContentType}.
877+
* Returns a {@link ContentType} from a given {@link MediaType}.
872878
*
873879
* @param mediaType the {@link MediaType}
874880
* @return the {@link ContentType}
875881
*/
876-
@SuppressForbidden(reason = "Only allowed place to convert a XContentType to a ContentType")
882+
@SuppressForbidden(reason = "Only allowed place to convert a MediaType to a ContentType")
877883
public static ContentType createContentType(final MediaType mediaType) {
878884
return ContentType.create(mediaType.mediaTypeWithoutParameters(), (Charset) null);
879885
}
@@ -1252,7 +1258,7 @@ Params withWaitForEvents(Priority waitForEvents) {
12521258
*/
12531259
static MediaType enforceSameContentType(IndexRequest indexRequest, @Nullable MediaType mediaType) {
12541260
MediaType requestContentType = indexRequest.getContentType();
1255-
if (requestContentType != XContentType.JSON && requestContentType != XContentType.SMILE) {
1261+
if (requestContentType != MediaTypeRegistry.JSON && requestContentType != MediaTypeRegistry.fromFormat("smile")) {
12561262
throw new IllegalArgumentException(
12571263
"Unsupported content-type found for request with content-type ["
12581264
+ requestContentType

client/rest-high-level/src/main/java/org/opensearch/client/indices/CreateIndexRequest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.opensearch.action.support.ActiveShardCount;
3939
import org.opensearch.client.TimedRequest;
4040
import org.opensearch.client.Validatable;
41-
import org.opensearch.common.Strings;
4241
import org.opensearch.core.common.bytes.BytesArray;
4342
import org.opensearch.core.common.bytes.BytesReference;
4443
import org.opensearch.common.settings.Settings;
@@ -135,7 +134,7 @@ public CreateIndexRequest settings(String source, MediaType mediaType) {
135134
* Allows to set the settings using a json builder.
136135
*/
137136
public CreateIndexRequest settings(XContentBuilder builder) {
138-
settings(Strings.toString(builder), builder.contentType());
137+
settings(builder.toString(), builder.contentType());
139138
return this;
140139
}
141140

0 commit comments

Comments
 (0)