Skip to content

Commit 19c1e09

Browse files
authored
Merge branch 'main' into serveroptimize
Signed-off-by: Karen X <karenxyr@gmail.com>
2 parents e876aae + e82cd9e commit 19c1e09

File tree

57 files changed

+915
-611
lines changed

Some content is hidden

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

57 files changed

+915
-611
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1515
- Add a dynamic setting to change skip_cache_factor and min_frequency for querycache ([#18351](https://github.com/opensearch-project/OpenSearch/issues/18351))
1616
- Add overload constructor for Translog to accept Channel Factory as a parameter ([#18918](https://github.com/opensearch-project/OpenSearch/pull/18918))
1717
- Add subdirectory-aware store module with recovery support ([#19132](https://github.com/opensearch-project/OpenSearch/pull/19132))
18+
- Field collapsing supports search_after ([#19261](https://github.com/opensearch-project/OpenSearch/pull/19261))
1819
- Add a dynamic cluster setting to control the enablement of the merged segment warmer ([#18929](https://github.com/opensearch-project/OpenSearch/pull/18929))
1920
- Publish transport-grpc-spi exposing QueryBuilderProtoConverter and QueryBuilderProtoConverterRegistry ([#18949](https://github.com/opensearch-project/OpenSearch/pull/18949))
2021
- Support system generated search pipeline. ([#19128](https://github.com/opensearch-project/OpenSearch/pull/19128))
2122
- Add `epoch_micros` date format ([#14669](https://github.com/opensearch-project/OpenSearch/issues/14669))
22-
- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799)
23+
- Grok processor supports capturing multiple values for same field name ([#18799](https://github.com/opensearch-project/OpenSearch/pull/18799))
2324
- Upgrade opensearch-protobufs dependency to 0.13.0 and update transport-grpc module compatibility ([#19007](https://github.com/opensearch-project/OpenSearch/issues/19007))
25+
- Add new extensible method to DocRequest to specify type ([#19313](https://github.com/opensearch-project/OpenSearch/pull/19313))
2426
- Optimize gRPC transport thread management for improved throughput ([#19278](https://github.com/opensearch-project/OpenSearch/pull/19278))
2527

2628
### Changed
@@ -33,6 +35,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3335
- Remove cap on Java version used by forbidden APIs ([#19163](https://github.com/opensearch-project/OpenSearch/pull/19163))
3436
- Disable pruning for `doc_values` for the wildcard field mapper ([#18568](https://github.com/opensearch-project/OpenSearch/pull/18568))
3537
- Make all methods in Engine.Result public ([#19276](https://github.com/opensearch-project/OpenSearch/pull/19275))
38+
- Create and attach interclusterTest and yamlRestTest code coverage reports to gradle check task([#19165](https://github.com/opensearch-project/OpenSearch/pull/19165))
39+
- Optimized date histogram aggregations by preventing unnecessary object allocations in date rounding utils ([19088](https://github.com/opensearch-project/OpenSearch/pull/19088))
3640

3741
### Fixed
3842
- Fix unnecessary refreshes on update preparation failures ([#15261](https://github.com/opensearch-project/OpenSearch/issues/15261))
@@ -83,6 +87,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8387
- Bump `com.google.code.gson:gson` from 2.13.1 to 2.13.2 ([#19290](https://github.com/opensearch-project/OpenSearch/pull/19290)) ([#19293](https://github.com/opensearch-project/OpenSearch/pull/19293))
8488
- Bump `actions/stale` from 9 to 10 ([#19292](https://github.com/opensearch-project/OpenSearch/pull/19292))
8589
- Bump `com.nimbusds:oauth2-oidc-sdk` from 11.25 to 11.28 ([#19291](https://github.com/opensearch-project/OpenSearch/pull/19291))
90+
- Bump `log4j2` from 2.21.0 to 2.25.1 ([#19184](https://github.com/opensearch-project/OpenSearch/pull/19184))
8691

8792
### Deprecated
8893

gradle/code-coverage.gradle

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,19 @@ allprojects {
5252
executionDataFiles.add("$buildDir/jacoco/javaRestTest.exec")
5353
sourceSetsList.add(sourceSets.javaRestTest)
5454
}
55+
if (tasks.findByName('yamlRestTest')) {
56+
executionDataFiles.add("$buildDir/jacoco/yamlRestTest.exec")
57+
sourceSetsList.add(sourceSets.yamlRestTest)
58+
}
5559
if (!executionDataFiles.isEmpty()) {
5660
executionData.setFrom(files(executionDataFiles).filter { it.exists() })
5761
sourceSets(*sourceSetsList)
5862
}
5963
onlyIf {
6064
file("$buildDir/jacoco/test.exec").exists() ||
6165
file("$buildDir/jacoco/internalClusterTest.exec").exists() ||
62-
file("$buildDir/jacoco/javaRestTest.exec").exists()
66+
file("$buildDir/jacoco/javaRestTest.exec").exists() ||
67+
file("$buildDir/jacoco/yamlRestTest.exec").exists()
6368
}
6469
}
6570
}
@@ -71,17 +76,25 @@ if (System.getProperty("tests.coverage")) {
7176
testCodeCoverageReport(JacocoCoverageReport) {
7277
testSuiteName = "test"
7378
}
79+
testCodeCoverageReportInternalClusterTest(JacocoCoverageReport) {
80+
testSuiteName = "internalClusterTest"
81+
}
7482
testCodeCoverageReportJavaRestTest(JacocoCoverageReport) {
7583
testSuiteName = "javaRestTest"
7684
}
85+
testCodeCoverageReportYamlRestTest(JacocoCoverageReport) {
86+
testSuiteName = "yamlRestTest"
87+
}
7788
}
7889
}
7990

8091
// Attach code coverage report task to Gradle check task
8192
project.getTasks().named(JavaBasePlugin.CHECK_TASK_NAME).configure {
8293
dependsOn(
8394
tasks.named('testCodeCoverageReport', JacocoReport),
84-
tasks.named('testCodeCoverageReportJavaRestTest', JacocoReport)
95+
tasks.named('testCodeCoverageReportInternalClusterTest', JacocoReport),
96+
tasks.named('testCodeCoverageReportJavaRestTest', JacocoReport),
97+
tasks.named('testCodeCoverageReportYamlRestTest', JacocoReport)
8598
)
8699
}
87100
}

gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jackson_databind = "2.18.2"
1313
snakeyaml = "2.1"
1414
icu4j = "77.1"
1515
supercsv = "2.4.0"
16-
log4j = "2.21.0"
16+
log4j = "2.25.1"
17+
error_prone_annotations = "2.41.0"
18+
spotbugs_annotations = "4.9.4"
1719
slf4j = "2.0.17"
1820
asm = "9.7"
1921
jettison = "1.5.4"

libs/core/licenses/log4j-api-2.21.0.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c7acbbd6f110cd1457c628da46245e355b1ee57a

modules/lang-painless/src/test/java/org/opensearch/painless/DerivedFieldScriptTests.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,26 @@ private DerivedFieldScript.LeafFactory compile(String expression, SearchLookup l
8282
return factory.newFactory(Collections.emptyMap(), lookup);
8383
}
8484

85+
public void testEmittingFloatField() throws IOException {
86+
SearchLookup lookup = mock(SearchLookup.class);
87+
88+
// Mock LeafReaderContext
89+
MemoryIndex index = new MemoryIndex();
90+
LeafReaderContext leafReaderContext = index.createSearcher().getIndexReader().leaves().get(0);
91+
92+
LeafSearchLookup leafSearchLookup = mock(LeafSearchLookup.class);
93+
when(lookup.getLeafSearchLookup(leafReaderContext)).thenReturn(leafSearchLookup);
94+
95+
// Script that emits a float value
96+
DerivedFieldScript script = compile("emit(3.14f)", lookup).newInstance(leafReaderContext);
97+
script.setDocument(1);
98+
script.execute();
99+
100+
List<Object> result = script.getEmittedValues();
101+
assertEquals(1, result.size());
102+
assertEquals(3.14f, result.get(0));
103+
}
104+
85105
public void testEmittingDoubleField() throws IOException {
86106
// Mocking field value to be returned
87107
NumberFieldType fieldType = new NumberFieldType("test_double_field", NumberType.DOUBLE);

modules/transport-grpc/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ dependencies {
2424
api project('spi')
2525
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
2626
runtimeOnly "com.google.guava:guava:${versions.guava}"
27-
implementation "com.google.errorprone:error_prone_annotations:2.24.1"
28-
implementation "com.google.guava:failureaccess:1.0.2"
27+
28+
compileOnly "com.github.spotbugs:spotbugs-annotations:${versions.spotbugs_annotations}"
29+
compileOnly "com.google.errorprone:error_prone_annotations:${versions.error_prone_annotations}"
30+
compileOnly "com.google.guava:failureaccess:1.0.2"
31+
2932
implementation "io.grpc:grpc-api:${versions.grpc}"
3033
implementation "io.grpc:grpc-core:${versions.grpc}"
3134
implementation "io.grpc:grpc-netty-shaded:${versions.grpc}"

modules/transport-grpc/licenses/error_prone_annotations-2.24.1.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

modules/transport-grpc/licenses/failureaccess-1.0.2.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

modules/transport-grpc/licenses/failureaccess-LICENSE.txt

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

0 commit comments

Comments
 (0)