Skip to content

Commit 683697c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into remote-path-type
Signed-off-by: Ashish Singh <ssashish@amazon.com>
2 parents 8ab4d9e + fbcc0d9 commit 683697c

File tree

313 files changed

+6582
-1730
lines changed

Some content is hidden

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

313 files changed

+6582
-1730
lines changed

CHANGELOG.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1616
- [S3 Repository] Add setting to control connection count for sync client ([#12028](https://github.com/opensearch-project/OpenSearch/pull/12028))
1717
- Views, simplify data access and manipulation by providing a virtual layer over one or more indices ([#11957](https://github.com/opensearch-project/OpenSearch/pull/11957))
1818
- Add Remote Store Migration Experimental flag and allow mixed mode clusters under same ([#11986](https://github.com/opensearch-project/OpenSearch/pull/11986))
19+
- Remote reindex: Add support for configurable retry mechanism ([#12561](https://github.com/opensearch-project/OpenSearch/pull/12561))
1920
- [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))
21+
- Tracing for deep search path ([#12103](https://github.com/opensearch-project/OpenSearch/pull/12103))
2022

2123
### Dependencies
2224
- Bump `log4j-core` from 2.18.0 to 2.19.0
2325
- Bump `forbiddenapis` from 3.3 to 3.4
2426
- Bump `avro` from 1.11.1 to 1.11.2
2527
- Bump `woodstox-core` from 6.3.0 to 6.3.1
2628
- Bump `xmlbeans` from 5.1.0 to 5.1.1 ([#4354](https://github.com/opensearch-project/OpenSearch/pull/4354))
27-
- Bump `reactor-netty-core` from 1.0.19 to 1.0.22 ([#4447](https://github.com/opensearch-project/OpenSearch/pull/4447))
2829
- Bump `reactive-streams` from 1.0.3 to 1.0.4 ([#4488](https://github.com/opensearch-project/OpenSearch/pull/4488))
2930
- Bump `jempbox` from 1.8.16 to 1.8.17 ([#4550](https://github.com/opensearch-project/OpenSearch/pull/4550))
3031
- Update to Gradle 7.6 and JDK-19 ([#4973](https://github.com/opensearch-project/OpenSearch/pull/4973))
@@ -52,6 +53,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5253
- Bump `org.bouncycastle:bcprov-jdk15to18` to `org.bouncycastle:bcprov-jdk18on` version 1.77 ([#12317](https://github.com/opensearch-project/OpenSearch/pull/12317))
5354
- Bump `org.bouncycastle:bcmail-jdk15to18` to `org.bouncycastle:bcmail-jdk18on` version 1.77 ([#12317](https://github.com/opensearch-project/OpenSearch/pull/12317))
5455
- Bump `org.bouncycastle:bcpkix-jdk15to18` to `org.bouncycastle:bcpkix-jdk18on` version 1.77 ([#12317](https://github.com/opensearch-project/OpenSearch/pull/12317))
56+
- Bump Jackson version from 2.16.1 to 2.16.2 ([#12611](https://github.com/opensearch-project/OpenSearch/pull/12611))
57+
- Bump `aws-sdk-java` from 2.20.55 to 2.20.86 ([#12251](https://github.com/opensearch-project/OpenSearch/pull/12251))
5558

5659
### Changed
5760
- [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948))
@@ -63,6 +66,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6366
- Add task completion count in search backpressure stats API ([#10028](https://github.com/opensearch-project/OpenSearch/pull/10028/))
6467
- Deprecate CamelCase `PathHierarchy` tokenizer name in favor to lowercase `path_hierarchy` ([#10894](https://github.com/opensearch-project/OpenSearch/pull/10894))
6568
- Switched to more reliable OpenSearch Lucene snapshot location([#11728](https://github.com/opensearch-project/OpenSearch/pull/11728))
69+
- Breaking change: Do not request "search_pipelines" metrics by default in NodesInfoRequest ([#12497](https://github.com/opensearch-project/OpenSearch/pull/12497))
6670

6771
### Deprecated
6872

@@ -108,14 +112,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
108112
- [Tiered caching] Make IndicesRequestCache implementation configurable [EXPERIMENTAL] ([#12533](https://github.com/opensearch-project/OpenSearch/pull/12533))
109113
- Add kuromoji_completion analyzer and filter ([#4835](https://github.com/opensearch-project/OpenSearch/issues/4835))
110114
- The org.opensearch.bootstrap.Security should support codebase for JAR files with classifiers ([#12586](https://github.com/opensearch-project/OpenSearch/issues/12586))
115+
- [Metrics Framework] Adds support for asynchronous gauge metric type. ([#12642](https://github.com/opensearch-project/OpenSearch/issues/12642))
116+
- Make search query counters dynamic to support all query types ([#12601](https://github.com/opensearch-project/OpenSearch/pull/12601))
117+
- [Tiered caching] Add policies controlling which values can enter pluggable caches [EXPERIMENTAL] ([#12542](https://github.com/opensearch-project/OpenSearch/pull/12542))
118+
- [Tiered caching] Add Stale keys Management and CacheCleaner to IndicesRequestCache ([#12625](https://github.com/opensearch-project/OpenSearch/pull/12625))
119+
- [Admission Control] Integrated IO Based AdmissionController to AdmissionControl Framework ([#12583](https://github.com/opensearch-project/OpenSearch/pull/12583))
111120

112121
### Dependencies
113122
- Bump `peter-evans/find-comment` from 2 to 3 ([#12288](https://github.com/opensearch-project/OpenSearch/pull/12288))
114123
- Bump `com.google.api.grpc:proto-google-common-protos` from 2.25.1 to 2.33.0 ([#12289](https://github.com/opensearch-project/OpenSearch/pull/12289))
115124
- Bump `com.squareup.okio:okio` from 3.7.0 to 3.8.0 ([#12290](https://github.com/opensearch-project/OpenSearch/pull/12290))
116125
- Bump `gradle/wrapper-validation-action` from 1 to 2 ([#12367](https://github.com/opensearch-project/OpenSearch/pull/12367))
117126
- Bump `netty` from 4.1.106.Final to 4.1.107.Final ([#12372](https://github.com/opensearch-project/OpenSearch/pull/12372))
118-
- Bump `opentelemetry` from 1.34.1 to 1.35.0 ([#12388](https://github.com/opensearch-project/OpenSearch/pull/12388))
127+
- Bump `opentelemetry` from 1.34.1 to 1.36.0 ([#12388](https://github.com/opensearch-project/OpenSearch/pull/12388), [#12618](https://github.com/opensearch-project/OpenSearch/pull/12618))
119128
- Bump Apache Lucene from 9.9.2 to 9.10.0 ([#12392](https://github.com/opensearch-project/OpenSearch/pull/12392))
120129
- Bump `org.apache.logging.log4j:log4j-core` from 2.22.1 to 2.23.1 ([#12464](https://github.com/opensearch-project/OpenSearch/pull/12464), [#12587](https://github.com/opensearch-project/OpenSearch/pull/12587))
121130
- Bump `antlr4` from 4.11.1 to 4.13.1 ([#12445](https://github.com/opensearch-project/OpenSearch/pull/12445))
@@ -127,9 +136,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
127136
- Bump `codecov/codecov-action` from 3 to 4 ([#12585](https://github.com/opensearch-project/OpenSearch/pull/12585))
128137
- Bump `org.apache.zookeeper:zookeeper` from 3.9.1 to 3.9.2 ([#12580](https://github.com/opensearch-project/OpenSearch/pull/12580))
129138
- Bump `org.codehaus.woodstox:stax2-api` from 4.2.1 to 4.2.2 ([#12579](https://github.com/opensearch-project/OpenSearch/pull/12579))
139+
- Bump Jackson version from 2.16.1 to 2.17.0 ([#12611](https://github.com/opensearch-project/OpenSearch/pull/12611), [#12662](https://github.com/opensearch-project/OpenSearch/pull/12662))
140+
- Bump `aws-sdk-java` from 2.20.55 to 2.20.86 ([#12251](https://github.com/opensearch-project/OpenSearch/pull/12251))
141+
- Bump `reactor-netty` from 1.1.15 to 1.1.17 ([#12633](https://github.com/opensearch-project/OpenSearch/pull/12633))
142+
- Bump `reactor` from 3.5.14 to 3.5.15 ([#12633](https://github.com/opensearch-project/OpenSearch/pull/12633))
130143

131144
### Changed
132145
- Allow composite aggregation to run under a parent filter aggregation ([#11499](https://github.com/opensearch-project/OpenSearch/pull/11499))
146+
- Quickly compute terms aggregations when the top-level query is functionally match-all for a segment ([#11643](https://github.com/opensearch-project/OpenSearch/pull/11643))
133147

134148
### Deprecated
135149

@@ -142,6 +156,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
142156
- Add a system property to configure YamlParser codepoint limits ([#12298](https://github.com/opensearch-project/OpenSearch/pull/12298))
143157
- Prevent read beyond slice boundary in ByteArrayIndexInput ([#10481](https://github.com/opensearch-project/OpenSearch/issues/10481))
144158
- Fix the "highlight.max_analyzer_offset" request parameter with "plain" highlighter ([#10919](https://github.com/opensearch-project/OpenSearch/pull/10919))
159+
- Prevent unnecessary fetch sub phase processor initialization during fetch phase execution ([#12503](https://github.com/opensearch-project/OpenSearch/pull/12503))
145160
- Warn about deprecated and ignored index.mapper.dynamic index setting ([#11193](https://github.com/opensearch-project/OpenSearch/pull/11193))
146161
- Fix `terms` query on `float` field when `doc_values` are turned off by reverting back to `FloatPoint` from `FloatField` ([#12499](https://github.com/opensearch-project/OpenSearch/pull/12499))
147162
- Fix get task API does not refresh resource stats ([#11531](https://github.com/opensearch-project/OpenSearch/pull/11531))

buildSrc/version.properties

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ bundled_jdk = 21.0.2+13
77
# optional dependencies
88
spatial4j = 0.7
99
jts = 1.15.0
10-
jackson = 2.16.1
11-
jackson_databind = 2.16.1
10+
jackson = 2.17.0
11+
jackson_databind = 2.17.0
1212
snakeyaml = 2.1
1313
icu4j = 70.1
1414
supercsv = 2.4.0
@@ -30,8 +30,8 @@ netty = 4.1.107.Final
3030
joda = 2.12.2
3131

3232
# project reactor
33-
reactor_netty = 1.1.15
34-
reactor = 3.5.14
33+
reactor_netty = 1.1.17
34+
reactor = 3.5.15
3535

3636
# client dependencies
3737
httpclient5 = 5.2.1
@@ -44,7 +44,7 @@ commonscodec = 1.15
4444
commonslang = 3.13.0
4545
commonscompress = 1.24.0
4646
# plugin dependencies
47-
aws = 2.20.55
47+
aws = 2.20.86
4848
reactivestreams = 1.0.4
4949

5050
# when updating this version, you need to ensure compatibility with:
@@ -70,5 +70,5 @@ jzlib = 1.1.3
7070
resteasy = 6.2.4.Final
7171

7272
# opentelemetry dependencies
73-
opentelemetry = 1.35.0
73+
opentelemetry = 1.36.0
7474
opentelemetrysemconv = 1.23.1-alpha

client/sniffer/licenses/jackson-core-2.16.1.jar.sha1

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

distribution/tools/upgrade-cli/licenses/jackson-annotations-2.16.1.jar.sha1

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

distribution/tools/upgrade-cli/licenses/jackson-databind-2.16.1.jar.sha1

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

libs/core/licenses/jackson-core-2.16.1.jar.sha1

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

libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistry.java

+9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
package org.opensearch.telemetry.metrics;
1010

11+
import org.opensearch.telemetry.metrics.tags.Tags;
12+
13+
import java.io.Closeable;
1114
import java.io.IOException;
15+
import java.util.function.Supplier;
1216

1317
/**
1418
* Default implementation for {@link MetricsRegistry}
@@ -39,6 +43,11 @@ public Histogram createHistogram(String name, String description, String unit) {
3943
return metricsTelemetry.createHistogram(name, description, unit);
4044
}
4145

46+
@Override
47+
public Closeable createGauge(String name, String description, String unit, Supplier<Double> valueProvider, Tags tags) {
48+
return metricsTelemetry.createGauge(name, description, unit, valueProvider, tags);
49+
}
50+
4251
@Override
4352
public void close() throws IOException {
4453
metricsTelemetry.close();

libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/MetricsRegistry.java

+16
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
package org.opensearch.telemetry.metrics;
1010

1111
import org.opensearch.common.annotation.ExperimentalApi;
12+
import org.opensearch.telemetry.metrics.tags.Tags;
1213

1314
import java.io.Closeable;
15+
import java.util.function.Supplier;
1416

1517
/**
1618
* MetricsRegistry helps in creating the metric instruments.
@@ -47,4 +49,18 @@ public interface MetricsRegistry extends Closeable {
4749
* @return histogram.
4850
*/
4951
Histogram createHistogram(String name, String description, String unit);
52+
53+
/**
54+
* Creates the Observable Gauge type of Metric. Where the value provider will be called at a certain frequency
55+
* to capture the value.
56+
*
57+
* @param name name of the observable gauge.
58+
* @param description any description about the metric.
59+
* @param unit unit of the metric.
60+
* @param valueProvider value provider.
61+
* @param tags attributes/dimensions of the metric.
62+
* @return closeable to dispose/close the Gauge metric.
63+
*/
64+
Closeable createGauge(String name, String description, String unit, Supplier<Double> valueProvider, Tags tags);
65+
5066
}

libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/noop/NoopMetricsRegistry.java

+8
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
import org.opensearch.telemetry.metrics.Counter;
1313
import org.opensearch.telemetry.metrics.Histogram;
1414
import org.opensearch.telemetry.metrics.MetricsRegistry;
15+
import org.opensearch.telemetry.metrics.tags.Tags;
1516

17+
import java.io.Closeable;
1618
import java.io.IOException;
19+
import java.util.function.Supplier;
1720

1821
/**
1922
*No-op {@link MetricsRegistry}
@@ -44,6 +47,11 @@ public Histogram createHistogram(String name, String description, String unit) {
4447
return NoopHistogram.INSTANCE;
4548
}
4649

50+
@Override
51+
public Closeable createGauge(String name, String description, String unit, Supplier<Double> valueProvider, Tags tags) {
52+
return () -> {};
53+
}
54+
4755
@Override
4856
public void close() throws IOException {
4957

libs/telemetry/src/main/java/org/opensearch/telemetry/tracing/SpanContext.java

+15
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,19 @@ public SpanContext(Span span) {
3131
Span getSpan() {
3232
return span;
3333
}
34+
35+
/**
36+
* Sets the error for the current span behind this context
37+
* @param cause error
38+
*/
39+
public void setError(final Exception cause) {
40+
span.setError(cause);
41+
}
42+
43+
/**
44+
* Ends current span
45+
*/
46+
public void endSpan() {
47+
span.endSpan();
48+
}
3449
}

libs/telemetry/src/main/java/org/opensearch/telemetry/tracing/SpanCreationContext.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public SpanCreationContext attributes(Attributes attributes) {
7979
}
8080

8181
/**
82-
* Sets the parent for spann
83-
* @param parent parent
82+
* Sets the parent for span
83+
* @param parent parent span context
8484
* @return spanCreationContext
8585
*/
8686
public SpanCreationContext parent(SpanContext parent) {

libs/telemetry/src/test/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistryTests.java

+20
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
package org.opensearch.telemetry.metrics;
1010

11+
import org.opensearch.telemetry.metrics.tags.Tags;
1112
import org.opensearch.test.OpenSearchTestCase;
1213

14+
import java.io.Closeable;
15+
import java.util.function.Supplier;
16+
1317
import static org.mockito.ArgumentMatchers.any;
1418
import static org.mockito.Mockito.mock;
1519
import static org.mockito.Mockito.when;
@@ -59,4 +63,20 @@ public void testHistogram() {
5963
assertSame(mockHistogram, histogram);
6064
}
6165

66+
@SuppressWarnings("unchecked")
67+
public void testGauge() {
68+
Closeable mockCloseable = mock(Closeable.class);
69+
when(
70+
defaultMeterRegistry.createGauge(any(String.class), any(String.class), any(String.class), any(Supplier.class), any(Tags.class))
71+
).thenReturn(mockCloseable);
72+
Closeable closeable = defaultMeterRegistry.createGauge(
73+
"org.opensearch.telemetry.metrics.DefaultMeterRegistryTests.testObservableGauge",
74+
"test observable gauge",
75+
"ms",
76+
() -> 1.0,
77+
Tags.EMPTY
78+
);
79+
assertSame(mockCloseable, closeable);
80+
}
81+
6282
}

libs/x-content/licenses/jackson-core-2.16.1.jar.sha1

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

libs/x-content/licenses/jackson-dataformat-cbor-2.16.1.jar.sha1

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

libs/x-content/licenses/jackson-dataformat-smile-2.16.1.jar.sha1

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

libs/x-content/licenses/jackson-dataformat-yaml-2.16.1.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
57a963c6258c49febc11390082d8503f71bb15a9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
/*
10+
* Modifications Copyright OpenSearch Contributors. See
11+
* GitHub history for details.
12+
*/
13+
14+
package org.opensearch.cache.common.policy;
15+
16+
import org.opensearch.common.cache.policy.CachedQueryResult;
17+
import org.opensearch.common.unit.TimeValue;
18+
19+
import java.util.function.Function;
20+
import java.util.function.Predicate;
21+
22+
/**
23+
* A cache tier policy which accepts queries whose took time is greater than some threshold.
24+
* The threshold should be set to approximately the time it takes to get a result from the cache tier.
25+
* The policy accepts values of type V and decodes them into CachedQueryResult.PolicyValues, which has the data needed
26+
* to decide whether to admit the value.
27+
* @param <V> The type of data consumed by test().
28+
*/
29+
public class TookTimePolicy<V> implements Predicate<V> {
30+
/**
31+
* The minimum took time to allow a query. Set to TimeValue.ZERO to let all data through.
32+
*/
33+
private final TimeValue threshold;
34+
35+
/**
36+
* Function which extracts the relevant PolicyValues from a serialized CachedQueryResult
37+
*/
38+
private final Function<V, CachedQueryResult.PolicyValues> cachedResultParser;
39+
40+
/**
41+
* Constructs a took time policy.
42+
* @param threshold the threshold
43+
* @param cachedResultParser the function providing policy values
44+
*/
45+
public TookTimePolicy(TimeValue threshold, Function<V, CachedQueryResult.PolicyValues> cachedResultParser) {
46+
if (threshold.compareTo(TimeValue.ZERO) < 0) {
47+
throw new IllegalArgumentException("Threshold for TookTimePolicy must be >= 0ms but was " + threshold.getStringRep());
48+
}
49+
this.threshold = threshold;
50+
this.cachedResultParser = cachedResultParser;
51+
}
52+
53+
/**
54+
* Check whether to admit data.
55+
* @param data the input argument
56+
* @return whether to admit the data
57+
*/
58+
public boolean test(V data) {
59+
long tookTimeNanos;
60+
try {
61+
tookTimeNanos = cachedResultParser.apply(data).getTookTimeNanos();
62+
} catch (Exception e) {
63+
// If we can't read a CachedQueryResult.PolicyValues from the BytesReference, reject the data
64+
return false;
65+
}
66+
67+
TimeValue tookTime = TimeValue.timeValueNanos(tookTimeNanos);
68+
return tookTime.compareTo(threshold) >= 0;
69+
}
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
/** A package for policies controlling what can enter caches. */
10+
package org.opensearch.cache.common.policy;

0 commit comments

Comments
 (0)