Skip to content

Commit 96daf8f

Browse files
authored
Merge branch 'main' into kumargu_java_agent_v1
Signed-off-by: Gulshan <[email protected]>
2 parents e36c1e5 + 6c0a95b commit 96daf8f

File tree

54 files changed

+1852
-1244
lines changed

Some content is hidden

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

54 files changed

+1852
-1244
lines changed

.ci/bwcVersions

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ BWC_VERSION:
4545
- "2.19.0"
4646
- "2.19.1"
4747
- "2.19.2"
48-
- "2.20.0"

.github/workflows/gradle-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v4
2525
- name: Get changed files
2626
id: changed-files-specific
27-
uses: tj-actions/changed-files@v45
27+
uses: tj-actions/changed-files@v46.0.1
2828
with:
2929
files_ignore: |
3030
release-notes/*.md

CHANGELOG-3.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2626
- [Star Tree] [Search] Resolving keyword & numeric bucket aggregation with metric aggregation using star-tree ([#17165](https://github.com/opensearch-project/OpenSearch/pull/17165))
2727
- Added error handling support for the pull-based ingestion ([#17427](https://github.com/opensearch-project/OpenSearch/pull/17427))
2828
- A Java Agent for intercepting socket operation and enforcing a security policy to it.
29+
- Added Warm index setting and Updated nomenclature to differentiate between hot and warm tiering implementation ([#17490](https://github.com/opensearch-project/OpenSearch/pull/17490))
30+
2931

3032
### Dependencies
3133
- Update Apache Lucene to 10.1.0 ([#16366](https://github.com/opensearch-project/OpenSearch/pull/16366))
@@ -51,6 +53,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5153
- Use Lucene `BM25Similarity` as default since the `LegacyBM25Similarity` is marked as deprecated ([#17306](https://github.com/opensearch-project/OpenSearch/pull/17306))
5254
- Wildcard field index only 3gram of the input data [#17349](https://github.com/opensearch-project/OpenSearch/pull/17349)
5355
- Use BC libraries to parse PEM files, increase key length, allow general use of known cryptographic binary extensions, remove unused BC dependencies ([#3420](https://github.com/opensearch-project/OpenSearch/pull/14912))
56+
- Add optional enum set read / write functionality to stream input / output ([#17556](https://github.com/opensearch-project/OpenSearch/pull/17556))
5457

5558
### Deprecated
5659

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2626
- Bump `com.google.api.grpc:proto-google-common-protos` from 2.37.1 to 2.52.0 ([#17379](https://github.com/opensearch-project/OpenSearch/pull/17379))
2727
- Bump `net.minidev:json-smart` from 2.5.1 to 2.5.2 ([#17378](https://github.com/opensearch-project/OpenSearch/pull/17378))
2828
- Bump `com.netflix.nebula.ospackage-base` from 11.10.1 to 11.11.1 ([#17374](https://github.com/opensearch-project/OpenSearch/pull/17374))
29+
- Bump `ch.qos.logback:logback-classic` from 1.5.16 to 1.5.17 ([#17497](https://github.com/opensearch-project/OpenSearch/pull/17497))
2930
- Bump `software.amazon.awssdk` from 2.20.86 to 2.30.31 ([17396](https://github.com/opensearch-project/OpenSearch/pull/17396))
3031
- Bump `org.jruby.jcodings:jcodings` from 1.0.61 to 1.0.63 ([#17560](https://github.com/opensearch-project/OpenSearch/pull/17560))
3132
- Bump `com.azure:azure-storage-blob` from 12.28.1 to 12.29.1 ([#17562](https://github.com/opensearch-project/OpenSearch/pull/17562))
@@ -40,10 +41,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4041
### Removed
4142

4243
### Fixed
44+
- Fix visit of inner query for FunctionScoreQueryBuilder ([#16776](https://github.com/opensearch-project/OpenSearch/pull/16776))
4345
- Fix case insensitive and escaped query on wildcard ([#16827](https://github.com/opensearch-project/OpenSearch/pull/16827))
4446
- Fix exists queries on nested flat_object fields throws exception ([#16803](https://github.com/opensearch-project/OpenSearch/pull/16803))
4547
- Add highlighting for wildcard search on `match_only_text` field ([#17101](https://github.com/opensearch-project/OpenSearch/pull/17101))
4648
- Fix illegal argument exception when creating a PIT ([#16781](https://github.com/opensearch-project/OpenSearch/pull/16781))
49+
- Fix NPE in node stats due to QueryGroupTasks ([#17576](https://github.com/opensearch-project/OpenSearch/pull/17576))
4750

4851
### Security
4952

libs/core/src/main/java/org/opensearch/Version.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ public class Version implements Comparable<Version>, ToXContentFragment {
116116
public static final Version V_2_19_0 = new Version(2190099, org.apache.lucene.util.Version.LUCENE_9_12_1);
117117
public static final Version V_2_19_1 = new Version(2190199, org.apache.lucene.util.Version.LUCENE_9_12_1);
118118
public static final Version V_2_19_2 = new Version(2190299, org.apache.lucene.util.Version.LUCENE_9_12_1);
119-
public static final Version V_2_20_0 = new Version(2200099, org.apache.lucene.util.Version.LUCENE_9_12_1);
120119
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_10_1_0);
121120
public static final Version CURRENT = V_3_0_0;
122121

libs/core/src/main/java/org/opensearch/core/common/io/stream/StreamInput.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,21 @@ public <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> enumClass) throws IOE
13051305
return res;
13061306
}
13071307

1308+
/**
1309+
* Reads an optional enum set with type E that was serialized based on the value of each enum's ordinal
1310+
* The set is expected to have been written using {@link StreamOutput#writeOptionalEnumSet(EnumSet)}
1311+
*
1312+
* @return the enum set of strings
1313+
* @throws IOException if an I/O exception occurs reading the set
1314+
*/
1315+
public <E extends Enum<E>> EnumSet<E> readOptionalEnumSet(Class<E> enumClass) throws IOException {
1316+
if (readBoolean()) {
1317+
return readEnumSet(enumClass);
1318+
} else {
1319+
return EnumSet.noneOf(enumClass);
1320+
}
1321+
}
1322+
13081323
public static StreamInput wrap(byte[] bytes) {
13091324
return wrap(bytes, 0, bytes.length);
13101325
}

libs/core/src/main/java/org/opensearch/core/common/io/stream/StreamOutput.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,19 @@ public <E extends Enum<E>> void writeEnumSet(EnumSet<E> enumSet) throws IOExcept
12551255
}
12561256
}
12571257

1258+
/**
1259+
* Writes an optional EnumSet with type E that serializes each enum based on its ordinal value
1260+
* For null or empty enum set, writes false;
1261+
*/
1262+
public <E extends Enum<E>> void writeOptionalEnumSet(@Nullable EnumSet<E> enumSet) throws IOException {
1263+
if (enumSet != null && enumSet.size() > 0) {
1264+
writeBoolean(true);
1265+
writeEnumSet(enumSet);
1266+
} else {
1267+
writeBoolean(false);
1268+
}
1269+
}
1270+
12581271
/**
12591272
* Write a {@link TimeValue} to the stream
12601273
*/

libs/core/src/test/java/org/opensearch/core/common/io/stream/BaseStreamTests.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import java.util.Arrays;
5454
import java.util.Collection;
5555
import java.util.Collections;
56+
import java.util.EnumSet;
5657
import java.util.HashMap;
5758
import java.util.HashSet;
5859
import java.util.LinkedHashMap;
@@ -354,6 +355,32 @@ private <T> void runWriteReadCollectionTest(
354355
}
355356
}
356357

358+
public void testOptionalEnumSet() throws IOException {
359+
EnumSet<TestEnum> enumSet = EnumSet.allOf(TestEnum.class);
360+
BytesStreamOutput out = new BytesStreamOutput();
361+
out.writeOptionalEnumSet(enumSet);
362+
EnumSet<TestEnum> targetSet = getStreamInput(out.bytes()).readOptionalEnumSet(TestEnum.class);
363+
assertEquals(enumSet, targetSet);
364+
365+
enumSet = EnumSet.of(TestEnum.A, TestEnum.C, TestEnum.E);
366+
out = new BytesStreamOutput();
367+
out.writeOptionalEnumSet(enumSet);
368+
targetSet = getStreamInput(out.bytes()).readOptionalEnumSet(TestEnum.class);
369+
assertEquals(enumSet, targetSet);
370+
371+
enumSet = EnumSet.noneOf(TestEnum.class);
372+
out = new BytesStreamOutput();
373+
out.writeOptionalEnumSet(enumSet);
374+
targetSet = getStreamInput(out.bytes()).readOptionalEnumSet(TestEnum.class);
375+
assertEquals(enumSet, targetSet);
376+
377+
enumSet = null;
378+
out = new BytesStreamOutput();
379+
out.writeOptionalEnumSet(enumSet);
380+
targetSet = getStreamInput(out.bytes()).readOptionalEnumSet(TestEnum.class);
381+
assertEquals(EnumSet.noneOf(TestEnum.class), targetSet);
382+
}
383+
357384
public void testSetOfLongs() throws IOException {
358385
final int size = randomIntBetween(0, 6);
359386
final Set<Long> sourceSet = new HashSet<>(size);
@@ -540,4 +567,11 @@ private void assertGenericRoundtrip(Object original) throws IOException {
540567
});
541568
}
542569

570+
private enum TestEnum {
571+
A,
572+
B,
573+
C,
574+
D,
575+
E;
576+
}
543577
}

plugins/repository-s3/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ test {
141141
// this is tested explicitly in separate test tasks
142142
exclude '**/RepositoryCredentialsTests.class'
143143
exclude '**/S3RepositoryThirdPartyTests.class'
144+
exclude '**/S3RemoteStoreIT.class'
144145
}
145146

146147
boolean useFixture = false
@@ -252,6 +253,7 @@ processYamlRestTestResources {
252253
internalClusterTest {
253254
// this is tested explicitly in a separate test task
254255
exclude '**/S3RepositoryThirdPartyTests.class'
256+
exclude '**/S3RemoteStoreIT.class'
255257
}
256258

257259
yamlRestTest {
@@ -408,6 +410,7 @@ TaskProvider s3ThirdPartyTest = tasks.register("s3ThirdPartyTest", Test) {
408410
setTestClassesDirs(internalTestSourceSet.getOutput().getClassesDirs())
409411
setClasspath(internalTestSourceSet.getRuntimeClasspath())
410412
include '**/S3RepositoryThirdPartyTests.class'
413+
include '**/S3RemoteStoreIT.class'
411414
systemProperty 'test.s3.account', s3PermanentAccessKey
412415
systemProperty 'test.s3.key', s3PermanentSecretKey
413416
systemProperty 'test.s3.bucket', s3PermanentBucket

0 commit comments

Comments
 (0)