Skip to content

Commit 7f9c5f5

Browse files
authored
Merge branch 'main' into cache-impl-size-setting-bugfix
Signed-off-by: Ankit Jain <[email protected]>
2 parents 8ea8f07 + e7e19f7 commit 7f9c5f5

File tree

153 files changed

+3848
-5144
lines changed

Some content is hidden

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

153 files changed

+3848
-5144
lines changed

.github/benchmark-configs.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,38 @@
239239
"data_instance_config": "4vCPU, 32G Mem, 16G Heap"
240240
},
241241
"baseline_cluster_config": "x64-r5.xlarge-1-shard-0-replica-snapshot-baseline"
242+
},
243+
"id_15": {
244+
"description": "Search only test-procedure for big5, uses lucene-10 index snapshot to restore the data for OS-3.0.0",
245+
"supported_major_versions": ["3"],
246+
"cluster-benchmark-configs": {
247+
"SINGLE_NODE_CLUSTER": "true",
248+
"MIN_DISTRIBUTION": "true",
249+
"TEST_WORKLOAD": "big5",
250+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"workload-snapshots-3x\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
251+
"CAPTURE_NODE_STAT": "true",
252+
"TEST_PROCEDURE": "restore-from-snapshot"
253+
},
254+
"cluster_configuration": {
255+
"size": "Single-Node",
256+
"data_instance_config": "4vCPU, 32G Mem, 16G Heap"
257+
},
258+
"baseline_cluster_config": "x64-r5.xlarge-1-shard-0-replica-snapshot-baseline"
259+
},
260+
"id_16": {
261+
"description": "Benchmarking config for NESTED workload, benchmarks nested queries with inner-hits",
262+
"supported_major_versions": ["2", "3"],
263+
"cluster-benchmark-configs": {
264+
"SINGLE_NODE_CLUSTER": "true",
265+
"MIN_DISTRIBUTION": "true",
266+
"TEST_WORKLOAD": "nested",
267+
"WORKLOAD_PARAMS": "{\"number_of_replicas\":\"0\",\"number_of_shards\":\"1\"}",
268+
"CAPTURE_NODE_STAT": "true"
269+
},
270+
"cluster_configuration": {
271+
"size": "Single-Node",
272+
"data_instance_config": "4vCPU, 32G Mem, 16G Heap"
273+
},
274+
"baseline_cluster_config": "x64-r5.xlarge-single-node-1-shard-0-replica-baseline"
275+
}
242276
}
243-
}

.github/workflows/benchmark-pull-request.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44
types: [created]
55
jobs:
66
run-performance-benchmark-on-pull-request:
7-
if: ${{ (github.event.issue.pull_request) && (contains(github.event.comment.body, '"run-benchmark-test"')) }}
7+
if: |
8+
github.repository == 'opensearch-project/OpenSearch' &&
9+
github.event.issue.pull_request &&
10+
contains(github.event.comment.body, '"run-benchmark-test"')
811
runs-on: ubuntu-latest
912
permissions:
1013
id-token: write
@@ -111,7 +114,7 @@ jobs:
111114
uses: actions/github-script@v7
112115
with:
113116
github-token: ${{ secrets.GITHUB_TOKEN }}
114-
result-encoding: string
117+
result-encoding: json
115118
script: |
116119
// Get the collaborators - filtered to maintainer permissions
117120
const maintainersResponse = await github.request('GET /repos/{owner}/{repo}/collaborators', {
@@ -121,12 +124,12 @@ jobs:
121124
affiliation: 'all',
122125
per_page: 100
123126
});
124-
return maintainersResponse.data.map(item => item.login).join(', ');
127+
return maintainersResponse.data.map(item => item.login);
125128
- uses: trstringer/manual-approval@v1
126-
if: (!contains(steps.get_approvers.outputs.result, github.event.comment.user.login))
129+
if: ${{ !contains(fromJSON(steps.get_approvers.outputs.result), github.event.comment.user.login) }}
127130
with:
128131
secret: ${{ github.TOKEN }}
129-
approvers: ${{ steps.get_approvers.outputs.result }}
132+
approvers: ${{ join(fromJSON(steps.get_approvers.outputs.result), ', ') }}
130133
minimum-approvals: 1
131134
issue-title: 'Request to approve/deny benchmark run for PR #${{ env.PR_NUMBER }}'
132135
issue-body: "Please approve or deny the benchmark run for PR #${{ env.PR_NUMBER }}"

.github/workflows/dco.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- name: lychee Link Checker
1515
id: lychee
16-
uses: lycheeverse/lychee-action@v2.1.0
16+
uses: lycheeverse/lychee-action@v2.2.0
1717
with:
1818
args: --accept=200,403,429 --exclude-mail **/*.html **/*.md **/*.txt **/*.json --exclude-file .lychee.excludes
1919
fail: true

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1818
- Support for keyword fields in star-tree index ([#16233](https://github.com/opensearch-project/OpenSearch/pull/16233))
1919
- Add a flag in QueryShardContext to differentiate inner hit query ([#16600](https://github.com/opensearch-project/OpenSearch/pull/16600))
2020
- Add vertical scaling and SoftReference for snapshot repository data cache ([#16489](https://github.com/opensearch-project/OpenSearch/pull/16489))
21+
- [Workload Management] Add Workload Management IT ([#16359](https://github.com/opensearch-project/OpenSearch/pull/16359))
2122
- Support prefix list for remote repository attributes([#16271](https://github.com/opensearch-project/OpenSearch/pull/16271))
2223
- Add new configuration setting `synonym_analyzer`, to the `synonym` and `synonym_graph` filters, enabling the specification of a custom analyzer for reading the synonym file ([#16488](https://github.com/opensearch-project/OpenSearch/pull/16488)).
2324
- Add stats for remote publication failure and move download failure stats to remote methods([#16682](https://github.com/opensearch-project/OpenSearch/pull/16682/))
25+
- Update script supports java.lang.String.sha1() and java.lang.String.sha256() methods ([#16923](https://github.com/opensearch-project/OpenSearch/pull/16923))
2426
- Added a precaution to handle extreme date values during sorting to prevent `arithmetic_exception: long overflow` ([#16812](https://github.com/opensearch-project/OpenSearch/pull/16812)).
2527
- Add search replica stats to segment replication stats API ([#16678](https://github.com/opensearch-project/OpenSearch/pull/16678))
2628
- Introduce a setting to disable download of full cluster state from remote on term mismatch([#16798](https://github.com/opensearch-project/OpenSearch/pull/16798/))
29+
- Added ability to retrieve value from DocValues in a flat_object filed([#16802](https://github.com/opensearch-project/OpenSearch/pull/16802))
30+
- Introduce framework for auxiliary transports and an experimental gRPC transport plugin ([#16534](https://github.com/opensearch-project/OpenSearch/pull/16534))
31+
- Changes to support IP field in star tree indexing([#16641](https://github.com/opensearch-project/OpenSearch/pull/16641/))
32+
- Support object fields in star-tree index([#16728](https://github.com/opensearch-project/OpenSearch/pull/16728/))
2733

2834
### Dependencies
2935
- Bump `com.google.cloud:google-cloud-core-http` from 2.23.0 to 2.47.0 ([#16504](https://github.com/opensearch-project/OpenSearch/pull/16504))
@@ -34,24 +40,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3440
- Bump `org.apache.hadoop:hadoop-minicluster` from 3.4.0 to 3.4.1 ([#16550](https://github.com/opensearch-project/OpenSearch/pull/16550))
3541
- Bump `org.apache.xmlbeans:xmlbeans` from 5.2.1 to 5.3.0 ([#16612](https://github.com/opensearch-project/OpenSearch/pull/16612), [#16854](https://github.com/opensearch-project/OpenSearch/pull/16854))
3642
- Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 9.47 ([#16611](https://github.com/opensearch-project/OpenSearch/pull/16611), [#16807](https://github.com/opensearch-project/OpenSearch/pull/16807))
37-
- Bump `lycheeverse/lychee-action` from 2.0.2 to 2.1.0 ([#16610](https://github.com/opensearch-project/OpenSearch/pull/16610))
43+
- Bump `lycheeverse/lychee-action` from 2.0.2 to 2.2.0 ([#16610](https://github.com/opensearch-project/OpenSearch/pull/16610), [#16897](https://github.com/opensearch-project/OpenSearch/pull/16897))
3844
- Bump `me.champeau.gradle.japicmp` from 0.4.4 to 0.4.5 ([#16614](https://github.com/opensearch-project/OpenSearch/pull/16614))
3945
- Bump `mockito` from 5.14.1 to 5.14.2, `objenesis` from 3.2 to 3.3 and `bytebuddy` from 1.15.4 to 1.15.10 ([#16655](https://github.com/opensearch-project/OpenSearch/pull/16655))
4046
- Bump `Netty` from 4.1.114.Final to 4.1.115.Final ([#16661](https://github.com/opensearch-project/OpenSearch/pull/16661))
4147
- Bump `org.xerial.snappy:snappy-java` from 1.1.10.6 to 1.1.10.7 ([#16665](https://github.com/opensearch-project/OpenSearch/pull/16665))
4248
- Bump `codecov/codecov-action` from 4 to 5 ([#16667](https://github.com/opensearch-project/OpenSearch/pull/16667))
4349
- Bump `org.apache.logging.log4j:log4j-core` from 2.24.1 to 2.24.3 ([#16718](https://github.com/opensearch-project/OpenSearch/pull/16718), [#16858](https://github.com/opensearch-project/OpenSearch/pull/16858))
4450
- Bump `jackson` from 2.17.2 to 2.18.2 ([#16733](https://github.com/opensearch-project/OpenSearch/pull/16733))
45-
- Bump `ch.qos.logback:logback-classic` from 1.2.13 to 1.5.12 ([#16716](https://github.com/opensearch-project/OpenSearch/pull/16716))
51+
- Bump `ch.qos.logback:logback-classic` from 1.2.13 to 1.5.15 ([#16716](https://github.com/opensearch-project/OpenSearch/pull/16716), [#16898](https://github.com/opensearch-project/OpenSearch/pull/16898))
4652
- Bump `com.azure:azure-identity` from 1.13.2 to 1.14.2 ([#16778](https://github.com/opensearch-project/OpenSearch/pull/16778))
4753
- Bump Apache Lucene from 9.12.0 to 9.12.1 ([#16846](https://github.com/opensearch-project/OpenSearch/pull/16846))
4854
- Bump `com.gradle.develocity` from 3.18.2 to 3.19 ([#16855](https://github.com/opensearch-project/OpenSearch/pull/16855))
4955
- Bump `org.jline:jline` from 3.27.1 to 3.28.0 ([#16857](https://github.com/opensearch-project/OpenSearch/pull/16857))
5056
- Bump `com.azure:azure-core` from 1.51.0 to 1.54.1 ([#16856](https://github.com/opensearch-project/OpenSearch/pull/16856))
57+
- Bump `com.nimbusds:oauth2-oidc-sdk` from 11.19.1 to 11.20.1 ([#16895](https://github.com/opensearch-project/OpenSearch/pull/16895))
58+
- Bump `com.netflix.nebula.ospackage-base` from 11.10.0 to 11.10.1 ([#16896](https://github.com/opensearch-project/OpenSearch/pull/16896))
59+
- Bump `com.microsoft.azure:msal4j` from 1.17.2 to 1.18.0 ([#16918](https://github.com/opensearch-project/OpenSearch/pull/16918))
60+
- Bump `org.apache.commons:commons-text` from 1.12.0 to 1.13.0 ([#16919](https://github.com/opensearch-project/OpenSearch/pull/16919))
61+
- Bump `ch.qos.logback:logback-core` from 1.5.12 to 1.5.16 ([#16951](https://github.com/opensearch-project/OpenSearch/pull/16951))
62+
- Bump `com.azure:azure-core-http-netty` from 1.15.5 to 1.15.7 ([#16952](https://github.com/opensearch-project/OpenSearch/pull/16952))
5163

5264
### Changed
5365
- Indexed IP field supports `terms_query` with more than 1025 IP masks [#16391](https://github.com/opensearch-project/OpenSearch/pull/16391)
5466
- Make entries for dependencies from server/build.gradle to gradle version catalog ([#16707](https://github.com/opensearch-project/OpenSearch/pull/16707))
67+
- Allow extended plugins to be optional ([#16909](https://github.com/opensearch-project/OpenSearch/pull/16909))
5568

5669
### Deprecated
5770
- Performing update operation with default pipeline or final pipeline is deprecated ([#16712](https://github.com/opensearch-project/OpenSearch/pull/16712))
@@ -75,6 +88,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7588
- Fix _list/shards API failing when closed indices are present ([#16606](https://github.com/opensearch-project/OpenSearch/pull/16606))
7689
- Fix remote shards balance ([#15335](https://github.com/opensearch-project/OpenSearch/pull/15335))
7790
- Fix max request cache size settings not working properly with pluggable caching ([#16636](https://github.com/opensearch-project/OpenSearch/pull/16636))
91+
- Always use `constant_score` query for `match_only_text` field ([#16964](https://github.com/opensearch-project/OpenSearch/pull/16964))
7892

7993
### Security
8094

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

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ public Set<File> getJarsToScan() {
229229
@TaskAction
230230
public void runThirdPartyAudit() throws IOException {
231231
Set<File> jars = getJarsToScan();
232-
233-
extractJars(jars);
232+
Set<File> extractedJars = extractJars(jars);
234233

235234
final String forbiddenApisOutput = runForbiddenAPIsCli();
236235

@@ -248,7 +247,7 @@ public void runThirdPartyAudit() throws IOException {
248247

249248
Set<String> jdkJarHellClasses = null;
250249
if (this.jarHellEnabled) {
251-
jdkJarHellClasses = runJdkJarHellCheck();
250+
jdkJarHellClasses = runJdkJarHellCheck(extractedJars);
252251
}
253252

254253
if (missingClassExcludes != null) {
@@ -301,16 +300,26 @@ private void logForbiddenAPIsOutput(String forbiddenApisOutput) {
301300
getLogger().error("Forbidden APIs output:\n{}==end of forbidden APIs==", forbiddenApisOutput);
302301
}
303302

304-
private void extractJars(Set<File> jars) {
303+
/**
304+
* Extract project jars to build directory as specified by getJarExpandDir.
305+
* Handle multi release jars by keeping versions closest to `targetCompatibility` version.
306+
* @param jars to extract to build dir
307+
* @return File set of extracted jars
308+
*/
309+
private Set<File> extractJars(Set<File> jars) {
310+
Set<File> extractedJars = new TreeSet<>();
305311
File jarExpandDir = getJarExpandDir();
306312
// We need to clean up to make sure old dependencies don't linger
307313
getProject().delete(jarExpandDir);
308314

309315
jars.forEach(jar -> {
316+
String jarPrefix = jar.getName().replace(".jar", "");
317+
File jarSubDir = new File(jarExpandDir, jarPrefix);
318+
extractedJars.add(jarSubDir);
310319
FileTree jarFiles = getProject().zipTree(jar);
311320
getProject().copy(spec -> {
312321
spec.from(jarFiles);
313-
spec.into(jarExpandDir);
322+
spec.into(jarSubDir);
314323
// exclude classes from multi release jars
315324
spec.exclude("META-INF/versions/**");
316325
});
@@ -329,14 +338,16 @@ private void extractJars(Set<File> jars) {
329338
Integer.parseInt(targetCompatibility.get().getMajorVersion())
330339
).forEach(majorVersion -> getProject().copy(spec -> {
331340
spec.from(getProject().zipTree(jar));
332-
spec.into(jarExpandDir);
341+
spec.into(jarSubDir);
333342
String metaInfPrefix = "META-INF/versions/" + majorVersion;
334343
spec.include(metaInfPrefix + "/**");
335344
// Drop the version specific prefix
336345
spec.eachFile(details -> details.setPath(details.getPath().replace(metaInfPrefix, "")));
337346
spec.setIncludeEmptyDirs(false);
338347
}));
339348
});
349+
350+
return extractedJars;
340351
}
341352

342353
private void assertNoJarHell(Set<String> jdkJarHellClasses) {
@@ -398,7 +409,12 @@ private String runForbiddenAPIsCli() throws IOException {
398409
return forbiddenApisOutput;
399410
}
400411

401-
private Set<String> runJdkJarHellCheck() throws IOException {
412+
/**
413+
* Execute java with JDK_JAR_HELL_MAIN_CLASS against provided jars with OpenSearch core in the classpath.
414+
* @param jars to scan for jarHell violations.
415+
* @return standard out of jarHell process.
416+
*/
417+
private Set<String> runJdkJarHellCheck(Set<File> jars) throws IOException {
402418
ByteArrayOutputStream standardOut = new ByteArrayOutputStream();
403419
InjectedExecOps execOps = getProject().getObjects().newInstance(InjectedExecOps.class);
404420
ExecResult execResult = execOps.getExecOps().javaexec(spec -> {
@@ -407,9 +423,8 @@ private Set<String> runJdkJarHellCheck() throws IOException {
407423
getRuntimeConfiguration(),
408424
getProject().getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME)
409425
);
410-
411426
spec.getMainClass().set(JDK_JAR_HELL_MAIN_CLASS);
412-
spec.args(getJarExpandDir());
427+
spec.args(jars);
413428
spec.setIgnoreExitValue(true);
414429
if (javaHome != null) {
415430
spec.setExecutable(javaHome + "/bin/java");

distribution/packages/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import java.util.regex.Pattern
6363
*/
6464

6565
plugins {
66-
id "com.netflix.nebula.ospackage-base" version "11.10.0"
66+
id "com.netflix.nebula.ospackage-base" version "11.10.1"
6767
}
6868

6969
void addProcessFilesTask(String type, boolean jdk) {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ google_http_client = "1.44.1"
2727
google_auth = "1.29.0"
2828
tdigest = "3.3"
2929
hdrhistogram = "2.2.2"
30-
grpc = "1.68.0"
30+
grpc = "1.68.2"
3131

3232
# when updating the JNA version, also update the version in buildSrc/build.gradle
3333
jna = "5.13.0"

gradle/missing-javadoc.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ configure([
170170
project(":libs:opensearch-common"),
171171
project(":libs:opensearch-core"),
172172
project(":libs:opensearch-compress"),
173-
project(":plugins:events-correlation-engine"),
174173
project(":server")
175174
]) {
176175
project.tasks.withType(MissingJavadocTask) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ public class Version implements Comparable<Version>, ToXContentFragment {
112112
public static final Version V_2_17_1 = new Version(2170199, org.apache.lucene.util.Version.LUCENE_9_11_1);
113113
public static final Version V_2_17_2 = new Version(2170299, org.apache.lucene.util.Version.LUCENE_9_11_1);
114114
public static final Version V_2_18_0 = new Version(2180099, org.apache.lucene.util.Version.LUCENE_9_12_0);
115-
public static final Version V_2_18_1 = new Version(2180199, org.apache.lucene.util.Version.LUCENE_9_12_0);
116-
public static final Version V_2_19_0 = new Version(2190099, org.apache.lucene.util.Version.LUCENE_9_12_0);
115+
public static final Version V_2_18_1 = new Version(2180199, org.apache.lucene.util.Version.LUCENE_9_12_1);
116+
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_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_12_1);
118118
public static final Version CURRENT = V_3_0_0;
119119

modules/lang-painless/src/main/java/org/opensearch/painless/PainlessModulePlugin.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import org.opensearch.script.ScriptContext;
6767
import org.opensearch.script.ScriptEngine;
6868
import org.opensearch.script.ScriptService;
69+
import org.opensearch.script.UpdateScript;
6970
import org.opensearch.search.aggregations.pipeline.MovingFunctionScript;
7071
import org.opensearch.threadpool.ThreadPool;
7172
import org.opensearch.watcher.ResourceWatcherService;
@@ -109,6 +110,11 @@ public final class PainlessModulePlugin extends Plugin implements ScriptPlugin,
109110
ingest.add(AllowlistLoader.loadFromResourceFiles(Allowlist.class, "org.opensearch.ingest.txt"));
110111
map.put(IngestScript.CONTEXT, ingest);
111112

113+
// Functions available to update scripts
114+
List<Allowlist> update = new ArrayList<>(Allowlist.BASE_ALLOWLISTS);
115+
update.add(AllowlistLoader.loadFromResourceFiles(Allowlist.class, "org.opensearch.update.txt"));
116+
map.put(UpdateScript.CONTEXT, update);
117+
112118
// Functions available to derived fields
113119
List<Allowlist> derived = new ArrayList<>(Allowlist.BASE_ALLOWLISTS);
114120
derived.add(AllowlistLoader.loadFromResourceFiles(Allowlist.class, "org.opensearch.derived.txt"));
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# The OpenSearch Contributors require contributions made to
5+
# this file be licensed under the Apache-2.0 license or a
6+
# compatible open source license.
7+
#
8+
9+
# This file contains an allowlist for the update scripts
10+
11+
class java.lang.String {
12+
String org.opensearch.painless.api.Augmentation sha1()
13+
String org.opensearch.painless.api.Augmentation sha256()
14+
}

0 commit comments

Comments
 (0)