Skip to content

Commit 0f9edb0

Browse files
committed
Merge branch 'main' of github.com:opensearch-project/OpenSearch into primary-rebalacing
2 parents c2baa39 + 5db84d1 commit 0f9edb0

File tree

178 files changed

+1547
-286
lines changed

Some content is hidden

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

178 files changed

+1547
-286
lines changed

CHANGELOG.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1919
- Remote reindex: Add support for configurable retry mechanism ([#12561](https://github.com/opensearch-project/OpenSearch/pull/12561))
2020
- [Admission Control] Integrate IO Usage Tracker to the Resource Usage Collector Service and Emit IO Usage Stats ([#11880](https://github.com/opensearch-project/OpenSearch/pull/11880))
2121
- Tracing for deep search path ([#12103](https://github.com/opensearch-project/OpenSearch/pull/12103))
22-
- Add explicit dependency to validatePom and generatePom tasks ([#12103](https://github.com/opensearch-project/OpenSearch/pull/12807))
22+
- Add explicit dependency to validatePom and generatePom tasks ([#12807](https://github.com/opensearch-project/OpenSearch/pull/12807))
23+
- Replace configureEach with all for publication iteration ([#12876](https://github.com/opensearch-project/OpenSearch/pull/12876))
2324

2425
### Dependencies
2526
- Bump `log4j-core` from 2.18.0 to 2.19.0
@@ -102,9 +103,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
102103

103104
## [Unreleased 2.x]
104105
### Added
106+
- Convert ingest processor supports ip type ([#12818](https://github.com/opensearch-project/OpenSearch/pull/12818))
107+
- Add a counter to node stat api to track shard going from idle to non-idle ([#12768](https://github.com/opensearch-project/OpenSearch/pull/12768))
108+
- Allow setting KEYSTORE_PASSWORD through env variable ([#12865](https://github.com/opensearch-project/OpenSearch/pull/12865))
109+
- [Concurrent Segment Search] Perform buildAggregation concurrently and support Composite Aggregations ([#12697](https://github.com/opensearch-project/OpenSearch/pull/12697))
105110
- Add cluster primary balance contraint for rebalancing with buffer ([#12656](https://github.com/opensearch-project/OpenSearch/pull/12656))
106111

107112
### Dependencies
113+
- Bump `org.apache.commons:commons-configuration2` from 2.10.0 to 2.10.1 ([#12896](https://github.com/opensearch-project/OpenSearch/pull/12896))
114+
- Bump `asm` from 9.6 to 9.7 ([#12908](https://github.com/opensearch-project/OpenSearch/pull/12908))
115+
- Bump `net.minidev:json-smart` from 2.5.0 to 2.5.1 ([#12893](https://github.com/opensearch-project/OpenSearch/pull/12893))
116+
- Bump `netty` from 4.1.107.Final to 4.1.108.Final ([#12924](https://github.com/opensearch-project/OpenSearch/pull/12924))
108117

109118
### Changed
110119
- [BWC and API enforcement] Enforcing the presence of API annotations at build time ([#12872](https://github.com/opensearch-project/OpenSearch/pull/12872))
@@ -114,8 +123,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
114123
### Removed
115124

116125
### Fixed
126+
- Fix issue with feature flags where default value may not be honored ([#12849](https://github.com/opensearch-project/OpenSearch/pull/12849))
117127

118128
### Security
119129

120130
[Unreleased 3.0]: https://github.com/opensearch-project/OpenSearch/compare/2.x...HEAD
121-
[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.12...2.x
131+
[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.13...2.x

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
[![Security Vulnerabilities](https://img.shields.io/github/issues/opensearch-project/OpenSearch/security%20vulnerability?labelColor=red)](https://github.com/opensearch-project/OpenSearch/issues?q=is%3Aissue+is%3Aopen+label%3A"security%20vulnerability")
88
[![Open Issues](https://img.shields.io/github/issues/opensearch-project/OpenSearch)](https://github.com/opensearch-project/OpenSearch/issues)
99
[![Open Pull Requests](https://img.shields.io/github/issues-pr/opensearch-project/OpenSearch)](https://github.com/opensearch-project/OpenSearch/pulls)
10-
[![2.10 Open Issues](https://img.shields.io/github/issues/opensearch-project/OpenSearch/v2.10.0)](https://github.com/opensearch-project/OpenSearch/issues?q=is%3Aissue+is%3Aopen+label%3A"v2.10.0")
11-
[![3.0 Open Issues](https://img.shields.io/github/issues/opensearch-project/OpenSearch/v3.0.0)](https://github.com/opensearch-project/OpenSearch/issues?q=is%3Aissue+is%3Aopen+label%3A"v3.0.0")
10+
[![2.14.0 Open Issues](https://img.shields.io/github/issues/opensearch-project/OpenSearch/v2.14.0)](https://github.com/opensearch-project/OpenSearch/issues?q=is%3Aissue+is%3Aopen+label%3A"v2.14.0")
11+
[![3.0.0 Open Issues](https://img.shields.io/github/issues/opensearch-project/OpenSearch/v3.0.0)](https://github.com/opensearch-project/OpenSearch/issues?q=is%3Aissue+is%3Aopen+label%3A"v3.0.0")
1212
[![GHA gradle check](https://github.com/opensearch-project/OpenSearch/actions/workflows/gradle-check.yml/badge.svg)](https://github.com/opensearch-project/OpenSearch/actions/workflows/gradle-check.yml)
1313
[![GHA validate pull request](https://github.com/opensearch-project/OpenSearch/actions/workflows/wrapper.yml/badge.svg)](https://github.com/opensearch-project/OpenSearch/actions/workflows/wrapper.yml)
1414
[![GHA precommit](https://github.com/opensearch-project/OpenSearch/actions/workflows/precommit.yml/badge.svg)](https://github.com/opensearch-project/OpenSearch/actions/workflows/precommit.yml)

buildSrc/src/main/java/org/opensearch/gradle/precommit/PomValidationPrecommitPlugin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class PomValidationPrecommitPlugin extends PrecommitPlugin {
4848
public TaskProvider<? extends Task> createTask(Project project) {
4949
TaskProvider<Task> validatePom = project.getTasks().register("validatePom");
5050
PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class);
51-
publishing.getPublications().configureEach(publication -> {
51+
publishing.getPublications().all(publication -> {
5252
String publicationName = Util.capitalize(publication.getName());
5353
TaskProvider<PomValidationTask> validateTask = project.getTasks()
5454
.register("validate" + publicationName + "Pom", PomValidationTask.class);
@@ -59,7 +59,7 @@ public TaskProvider<? extends Task> createTask(Project project) {
5959
validateTask.configure(task -> {
6060
task.dependsOn(generateMavenPom);
6161
task.getPomFile().fileProvider(generateMavenPom.map(GenerateMavenPom::getDestination));
62-
publishing.getPublications().configureEach(publicationForPomGen -> {
62+
publishing.getPublications().all(publicationForPomGen -> {
6363
task.mustRunAfter(
6464
project.getTasks()
6565
.withType(GenerateMavenPom.class)

buildSrc/src/testFixtures/java/org/opensearch/gradle/test/GradleThreadsFilter.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public class GradleThreadsFilter implements ThreadFilter {
4545
public boolean reject(Thread t) {
4646
return t.getName().startsWith("Exec process")
4747
|| t.getName().startsWith("Memory manager")
48-
|| t.getName().startsWith("File watcher consumer");
48+
|| t.getName().startsWith("File watcher consumer")
49+
|| t.getName().startsWith("sshd-SshClient") /* Started by SshClient (sshd-core), part of SftpFileSystemProvider */
50+
|| t.getName().startsWith("Thread-"); /* Started by AbstractFactoryManager (sshd-core), part of SftpFileSystemProvider */
4951
}
5052
}

buildSrc/version.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ icu4j = 70.1
1414
supercsv = 2.4.0
1515
log4j = 2.21.0
1616
slf4j = 1.7.36
17-
asm = 9.6
17+
asm = 9.7
1818
jettison = 1.5.4
1919
woodstox = 6.4.0
2020
kotlin = 1.7.10
@@ -26,7 +26,7 @@ jakarta_annotation = 1.3.5
2626
# when updating the JNA version, also update the version in buildSrc/build.gradle
2727
jna = 5.13.0
2828

29-
netty = 4.1.107.Final
29+
netty = 4.1.108.Final
3030
joda = 2.12.2
3131

3232
# project reactor

distribution/src/bin/opensearch

+7-5
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ fi
3636

3737
# get keystore password before setting java options to avoid
3838
# conflicting GC configurations for the keystore tools
39-
unset KEYSTORE_PASSWORD
40-
KEYSTORE_PASSWORD=
4139
if [[ $CHECK_KEYSTORE = true ]] \
4240
&& bin/opensearch-keystore has-passwd --silent
4341
then
44-
if ! read -s -r -p "OpenSearch keystore password: " KEYSTORE_PASSWORD ; then
45-
echo "Failed to read keystore password on console" 1>&2
46-
exit 1
42+
if [[ ! -z "${KEYSTORE_PASSWORD}" ]]; then
43+
echo "Using value of KEYSTORE_PASSWORD from the environment"
44+
else
45+
if ! read -s -r -p "OpenSearch keystore password: " KEYSTORE_PASSWORD ; then
46+
echo "Failed to read keystore password on console" 1>&2
47+
exit 1
48+
fi
4749
fi
4850
fi
4951

distribution/src/bin/opensearch.bat

+8-5
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,17 @@ if not exist "%SERVICE_LOG_DIR%" (
6262
mkdir "%SERVICE_LOG_DIR%"
6363
)
6464

65-
SET KEYSTORE_PASSWORD=
6665
IF "%checkpassword%"=="Y" (
6766
CALL "%~dp0opensearch-keystore.bat" has-passwd --silent
6867
IF !ERRORLEVEL! EQU 0 (
69-
SET /P KEYSTORE_PASSWORD=OpenSearch keystore password:
70-
IF !ERRORLEVEL! NEQ 0 (
71-
ECHO Failed to read keystore password on standard input
72-
EXIT /B !ERRORLEVEL!
68+
if defined KEYSTORE_PASSWORD (
69+
ECHO Using value of KEYSTORE_PASSWORD from the environment
70+
) else (
71+
SET /P KEYSTORE_PASSWORD=OpenSearch keystore password:
72+
IF !ERRORLEVEL! NEQ 0 (
73+
ECHO Failed to read keystore password on standard input
74+
EXIT /B !ERRORLEVEL!
75+
)
7376
)
7477
)
7578
)

gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
distributionBase=GRADLE_USER_HOME
1313
distributionPath=wrapper/dists
14-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
14+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
1515
zipStoreBase=GRADLE_USER_HOME
1616
zipStorePath=wrapper/dists
17-
distributionSha256Sum=85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d
17+
distributionSha256Sum=194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0

modules/ingest-common/src/main/java/org/opensearch/ingest/common/ConvertProcessor.java

+14
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
package org.opensearch.ingest.common;
3434

35+
import org.opensearch.common.network.InetAddresses;
3536
import org.opensearch.ingest.AbstractProcessor;
3637
import org.opensearch.ingest.ConfigurationUtils;
3738
import org.opensearch.ingest.IngestDocument;
@@ -118,6 +119,19 @@ public Object convert(Object value) {
118119
return value.toString();
119120
}
120121
},
122+
IP {
123+
@Override
124+
public Object convert(Object value) {
125+
// If the value is a valid ipv4/ipv6 address, we return the original value directly because IpFieldType
126+
// can accept string value, this is simpler than we return an InetAddress object which needs to do more
127+
// work such as serialization
128+
if (value instanceof String && InetAddresses.isInetAddress(value.toString())) {
129+
return value;
130+
} else {
131+
throw new IllegalArgumentException("[" + value + "] is not a valid ipv4/ipv6 address");
132+
}
133+
}
134+
},
121135
AUTO {
122136
@Override
123137
public Object convert(Object value) {

modules/ingest-common/src/test/java/org/opensearch/ingest/common/ConvertProcessorTests.java

+25
Original file line numberDiff line numberDiff line change
@@ -550,4 +550,29 @@ public void testTargetField() throws Exception {
550550
assertThat(ingestDocument.getFieldValue(fieldName, String.class), equalTo(String.valueOf(randomInt)));
551551
assertThat(ingestDocument.getFieldValue(targetField, Integer.class), equalTo(randomInt));
552552
}
553+
554+
public void testConvertIP() throws Exception {
555+
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random());
556+
String validIPString;
557+
if (randomBoolean()) {
558+
validIPString = "1.2.3.4";
559+
} else {
560+
validIPString = "::1";
561+
}
562+
String fieldName = RandomDocumentPicks.addRandomField(random(), ingestDocument, validIPString);
563+
564+
Processor processor = new ConvertProcessor(randomAlphaOfLength(10), null, fieldName, fieldName, Type.IP, false);
565+
processor.execute(ingestDocument);
566+
assertThat(ingestDocument.getFieldValue(fieldName, String.class), equalTo(validIPString));
567+
568+
String invalidIPString = randomAlphaOfLength(10);
569+
fieldName = RandomDocumentPicks.addRandomField(random(), ingestDocument, invalidIPString);
570+
Processor processorWithInvalidIP = new ConvertProcessor(randomAlphaOfLength(10), null, fieldName, fieldName, Type.IP, false);
571+
try {
572+
processorWithInvalidIP.execute(ingestDocument);
573+
fail("processor execute should have failed");
574+
} catch (IllegalArgumentException e) {
575+
assertThat(e.getMessage(), equalTo("[" + invalidIPString + "] is not a valid ipv4/ipv6 address"));
576+
}
577+
}
553578
}

modules/ingest-common/src/test/java/org/opensearch/ingest/common/CopyProcessorTests.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class CopyProcessorTests extends OpenSearchTestCase {
2424
public void testCopyExistingField() throws Exception {
2525
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random());
2626
String sourceFieldName = RandomDocumentPicks.randomExistingFieldName(random(), ingestDocument);
27-
String targetFieldName = RandomDocumentPicks.randomFieldName(random());
27+
String targetFieldName = RandomDocumentPicks.randomNonExistingFieldName(random(), ingestDocument);
2828
Processor processor = createCopyProcessor(sourceFieldName, targetFieldName, false, false, false);
2929
processor.execute(ingestDocument);
3030
assertThat(ingestDocument.hasField(targetFieldName), equalTo(true));
@@ -71,7 +71,8 @@ public void testCopyWithIgnoreMissing() throws Exception {
7171
public void testCopyWithRemoveSource() throws Exception {
7272
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random());
7373
String sourceFieldName = RandomDocumentPicks.randomExistingFieldName(random(), ingestDocument);
74-
String targetFieldName = RandomDocumentPicks.randomFieldName(random());
74+
String targetFieldName = RandomDocumentPicks.randomNonExistingFieldName(random(), ingestDocument);
75+
7576
Object sourceValue = ingestDocument.getFieldValue(sourceFieldName, Object.class);
7677

7778
Processor processor = createCopyProcessor(sourceFieldName, targetFieldName, false, true, false);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
teardown:
3+
- do:
4+
ingest.delete_pipeline:
5+
id: "1"
6+
ignore: 404
7+
8+
---
9+
"Test convert processor with ip type":
10+
- skip:
11+
version: " - 2.13.99"
12+
reason: "introduced in 2.14.0"
13+
- do:
14+
ingest.put_pipeline:
15+
id: "1"
16+
body: >
17+
{
18+
"processors": [
19+
{
20+
"convert" : {
21+
"field" : "raw_ip",
22+
"type": "ip"
23+
}
24+
}
25+
]
26+
}
27+
- match: { acknowledged: true }
28+
29+
- do:
30+
catch: /\[1.1.1.\] is not a valid ipv4\/ipv6 address/
31+
index:
32+
index: test
33+
id: 1
34+
pipeline: "1"
35+
body: {
36+
raw_ip: "1.1.1."
37+
}
38+
39+
- do:
40+
ingest.put_pipeline:
41+
id: "1"
42+
body: >
43+
{
44+
"processors": [
45+
{
46+
"convert" : {
47+
"field" : "raw_ip",
48+
"target_field" : "ip_field",
49+
"type" : "ip",
50+
"ignore_failure" : true
51+
}
52+
}
53+
]
54+
}
55+
- match: { acknowledged: true }
56+
57+
- do:
58+
index:
59+
index: test
60+
id: 1
61+
pipeline: "1"
62+
body: {
63+
raw_ip: "1.1.1."
64+
}
65+
- do:
66+
get:
67+
index: test
68+
id: 1
69+
- match: { _source: { raw_ip: "1.1.1."} }
70+
71+
- do:
72+
index:
73+
index: test
74+
id: 1
75+
pipeline: "1"
76+
body: {
77+
raw_ip: "1.1.1.1"
78+
}
79+
- do:
80+
get:
81+
index: test
82+
id: 1
83+
- match: { _source: { raw_ip: "1.1.1.1", ip_field: "1.1.1.1"} }

modules/lang-expression/licenses/asm-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
073d7b3086e14beb604ced229c302feff6449723

modules/lang-expression/licenses/asm-commons-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e86dda4696d3c185fcc95d8d311904e7ce38a53f

modules/lang-expression/licenses/asm-tree-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e446a17b175bfb733b87c5c2560ccb4e57d69f1a

modules/lang-painless/licenses/asm-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
073d7b3086e14beb604ced229c302feff6449723

modules/lang-painless/licenses/asm-analysis-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e4a258b7eb96107106c0599f0061cfc1832fe07a

modules/lang-painless/licenses/asm-commons-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e86dda4696d3c185fcc95d8d311904e7ce38a53f

modules/lang-painless/licenses/asm-tree-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e446a17b175bfb733b87c5c2560ccb4e57d69f1a

modules/lang-painless/licenses/asm-util-9.6.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c0655519f24d92af2202cb681cd7c1569df6ead6

modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/71_context_api.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- do:
33
scripts_painless_context: {}
44
- match: { contexts.0: aggregation_selector}
5-
- match: { contexts.23: update}
5+
- match: { contexts.24: update}
66
---
77

88
"Action to get all API values for score context":

modules/transport-netty4/licenses/netty-buffer-4.1.107.Final.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2a9d06026ed251705e6ab52fa6ebe5f4f15aab7a

modules/transport-netty4/licenses/netty-codec-4.1.107.Final.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c2ef6018eecde345fcddb96e31f651df16dca4c2

modules/transport-netty4/licenses/netty-codec-http-4.1.107.Final.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dd44733e94f3f6237c896f2bbe9927c1eba48543

modules/transport-netty4/licenses/netty-codec-http2-4.1.107.Final.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ed90430e545529a2df7c1db6c94568ea00867a61

modules/transport-netty4/licenses/netty-common-4.1.107.Final.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
30617b39cc6f850ca3807459fe726fbcd63989f2

0 commit comments

Comments
 (0)