Skip to content

Commit 2c4b189

Browse files
authored
Merge branch 'opensearch-project:main' into reroute_npe
2 parents 4227892 + 4ad1be3 commit 2c4b189

File tree

130 files changed

+5993
-555
lines changed

Some content is hidden

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

130 files changed

+5993
-555
lines changed

Diff for: .ci/bwcVersions

+1
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ BWC_VERSION:
4141
- "2.17.1"
4242
- "2.17.2"
4343
- "2.18.0"
44+
- "2.19.0"

Diff for: CHANGELOG.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2626
- Add _list/shards API as paginated alternate to _cat/shards ([#14641](https://github.com/opensearch-project/OpenSearch/pull/14641))
2727
- Latency and Memory allocation improvements to Multi Term Aggregation queries ([#14993](https://github.com/opensearch-project/OpenSearch/pull/14993))
2828
- Flat object field use IndexOrDocValuesQuery to optimize query ([#14383](https://github.com/opensearch-project/OpenSearch/issues/14383))
29+
- Add support for renaming aliases during snapshot restore ([#16292](https://github.com/opensearch-project/OpenSearch/pull/16292))
30+
- Add method to return dynamic SecureTransportParameters from SecureTransportSettingsProvider interface ([#16387](https://github.com/opensearch-project/OpenSearch/pull/16387))
31+
- URI path filtering support in cluster stats API ([#15938](https://github.com/opensearch-project/OpenSearch/pull/15938))
32+
- [Star Tree - Search] Add support for metric aggregations with/without term query ([15289](https://github.com/opensearch-project/OpenSearch/pull/15289))
33+
- Add support for restoring from snapshot with search replicas ([#16111](https://github.com/opensearch-project/OpenSearch/pull/16111))
2934

3035
### Dependencies
3136
- Bump `com.azure:azure-identity` from 1.13.0 to 1.13.2 ([#15578](https://github.com/opensearch-project/OpenSearch/pull/15578))
3237
- Bump `protobuf` from 3.22.3 to 3.25.4 ([#15684](https://github.com/opensearch-project/OpenSearch/pull/15684))
3338
- Bump `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.1 ([#15858](https://github.com/opensearch-project/OpenSearch/pull/15858), [#16134](https://github.com/opensearch-project/OpenSearch/pull/16134))
3439
- Bump `peter-evans/create-pull-request` from 6 to 7 ([#15863](https://github.com/opensearch-project/OpenSearch/pull/15863))
3540
- Bump `com.nimbusds:oauth2-oidc-sdk` from 11.9.1 to 11.19.1 ([#15862](https://github.com/opensearch-project/OpenSearch/pull/15862))
36-
- Bump `com.microsoft.azure:msal4j` from 1.17.0 to 1.17.1 ([#15945](https://github.com/opensearch-project/OpenSearch/pull/15945))
41+
- Bump `com.microsoft.azure:msal4j` from 1.17.0 to 1.17.2 ([#15945](https://github.com/opensearch-project/OpenSearch/pull/15945), [#16406](https://github.com/opensearch-project/OpenSearch/pull/16406))
3742
- Bump `ch.qos.logback:logback-core` from 1.5.6 to 1.5.10 ([#15946](https://github.com/opensearch-project/OpenSearch/pull/15946), [#16307](https://github.com/opensearch-project/OpenSearch/pull/16307))
3843
- Update protobuf from 3.25.4 to 3.25.5 ([#16011](https://github.com/opensearch-project/OpenSearch/pull/16011))
3944
- Bump `org.roaringbitmap:RoaringBitmap` from 1.2.1 to 1.3.0 ([#16040](https://github.com/opensearch-project/OpenSearch/pull/16040))
@@ -64,6 +69,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6469
- Code cleanup: Remove ApproximateIndexOrDocValuesQuery ([#16273](https://github.com/opensearch-project/OpenSearch/pull/16273))
6570
- Optimise clone operation for incremental full cluster snapshots ([#16296](https://github.com/opensearch-project/OpenSearch/pull/16296))
6671
- Update last seen cluster state in the commit phase ([#16215](https://github.com/opensearch-project/OpenSearch/pull/16215))
72+
- Make multiple settings dynamic for tuning on larger clusters([#16347](https://github.com/opensearch-project/OpenSearch/pull/16347))
6773

6874
### Deprecated
6975

@@ -81,12 +87,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8187
- Streaming bulk request hangs ([#16158](https://github.com/opensearch-project/OpenSearch/pull/16158))
8288
- Fix warnings from SLF4J on startup when repository-s3 is installed ([#16194](https://github.com/opensearch-project/OpenSearch/pull/16194))
8389
- Fix protobuf-java leak through client library dependencies ([#16254](https://github.com/opensearch-project/OpenSearch/pull/16254))
90+
- Fix get index settings API doesn't show `number_of_routing_shards` setting when it was explicitly set ([#16294](https://github.com/opensearch-project/OpenSearch/pull/16294))
8491
- Fix multi-search with template doesn't return status code ([#16265](https://github.com/opensearch-project/OpenSearch/pull/16265))
8592
- [Streaming Indexing] Fix intermittent 'The bulk request must be terminated by a newline [\n]' failures [#16337](https://github.com/opensearch-project/OpenSearch/pull/16337))
8693
- Fix wrong default value when setting `index.number_of_routing_shards` to null on index creation ([#16331](https://github.com/opensearch-project/OpenSearch/pull/16331))
87-
- [Workload Management] Make query groups persistent across process restarts [#16370](https://github.com/opensearch-project/OpenSearch/pull/16370)
88-
94+
- [Workload Management] Make query groups persistent across process restarts ([#16370](https://github.com/opensearch-project/OpenSearch/pull/16370))
95+
- [Workload Management] Enhance rejection mechanism in workload management ([#16417](https://github.com/opensearch-project/OpenSearch/pull/16417))
8996
- Fix inefficient Stream API call chains ending with count() ([#15386](https://github.com/opensearch-project/OpenSearch/pull/15386))
97+
- Fix array hashCode calculation in ResyncReplicationRequest ([#16378](https://github.com/opensearch-project/OpenSearch/pull/16378))
98+
- Fix missing fields in task index mapping to ensure proper task result storage ([#16201](https://github.com/opensearch-project/OpenSearch/pull/16201))
99+
- Fix typo super->sb in method toString() of RemoteStoreNodeAttribute ([#15362](https://github.com/opensearch-project/OpenSearch/pull/15362))
100+
- [Workload Management] Fixing Create/Update QueryGroup TransportActions to execute from non-cluster manager nodes ([16422](https://github.com/opensearch-project/OpenSearch/pull/16422))
101+
- Fix flaky test in `testApproximateRangeWithSizeOverDefault` by adjusting totalHits assertion logic ([#16434](https://github.com/opensearch-project/OpenSearch/pull/16434#pullrequestreview-2386999409))
102+
- Revert changes to upload remote state manifest using minimum codec version([#16403](https://github.com/opensearch-project/OpenSearch/pull/16403))
90103

91104
### Security
92105

Diff for: buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
import java.util.stream.Stream;
7878

7979
public class DistroTestPlugin implements Plugin<Project> {
80-
private static final String SYSTEM_JDK_VERSION = "23+37";
80+
private static final String SYSTEM_JDK_VERSION = "23.0.1+11";
8181
private static final String SYSTEM_JDK_VENDOR = "adoptium";
82-
private static final String GRADLE_JDK_VERSION = "23+37";
82+
private static final String GRADLE_JDK_VERSION = "23.0.1+11";
8383
private static final String GRADLE_JDK_VENDOR = "adoptium";
8484

8585
// all distributions used by distro tests. this is temporary until tests are per distribution

Diff for: buildSrc/version.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ opensearch = 3.0.0
22
lucene = 9.12.0
33

44
bundled_jdk_vendor = adoptium
5-
bundled_jdk = 23+37
5+
bundled_jdk = 23.0.1+11
66

77
# optional dependencies
88
spatial4j = 0.7

Diff for: libs/core/src/main/java/org/opensearch/Version.java

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
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);
115115
public static final Version V_3_0_0 = new Version(3000099, 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);
116117
public static final Version CURRENT = V_3_0_0;
117118

118119
public static Version fromId(int id) {

Diff for: modules/transport-netty4/src/main/java/org/opensearch/transport/netty4/ssl/SecureNetty4Transport.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ public SSLServerChannelInitializer(String name) {
142142
protected void initChannel(Channel ch) throws Exception {
143143
super.initChannel(ch);
144144

145-
final boolean dualModeEnabled = NetworkModule.TRANSPORT_SSL_DUAL_MODE_ENABLED.get(settings);
145+
final boolean dualModeEnabled = secureTransportSettingsProvider.parameters(settings)
146+
.map(SecureTransportSettingsProvider.SecureTransportParameters::dualModeEnabled)
147+
.orElse(false);
146148
if (dualModeEnabled) {
147149
logger.info("SSL Dual mode enabled, using port unification handler");
148150
final ChannelHandler portUnificationHandler = new DualModeSslHandler(
@@ -258,7 +260,9 @@ protected class SSLClientChannelInitializer extends Netty4Transport.ClientChanne
258260
public SSLClientChannelInitializer(DiscoveryNode node) {
259261
this.node = node;
260262

261-
final boolean dualModeEnabled = NetworkModule.TRANSPORT_SSL_DUAL_MODE_ENABLED.get(settings);
263+
final boolean dualModeEnabled = secureTransportSettingsProvider.parameters(settings)
264+
.map(SecureTransportSettingsProvider.SecureTransportParameters::dualModeEnabled)
265+
.orElse(false);
262266
hostnameVerificationEnabled = NetworkModule.TRANSPORT_SSL_ENFORCE_HOSTNAME_VERIFICATION.get(settings);
263267
hostnameVerificationResolveHostName = NetworkModule.TRANSPORT_SSL_ENFORCE_HOSTNAME_VERIFICATION_RESOLVE_HOST_NAME.get(settings);
264268

Diff for: plugins/repository-azure/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dependencies {
6161
// Start of transitive dependencies for azure-identity
6262
api 'com.microsoft.azure:msal4j-persistence-extension:1.3.0'
6363
api "net.java.dev.jna:jna-platform:${versions.jna}"
64-
api 'com.microsoft.azure:msal4j:1.17.1'
64+
api 'com.microsoft.azure:msal4j:1.17.2'
6565
api 'com.nimbusds:oauth2-oidc-sdk:11.19.1'
6666
api 'com.nimbusds:nimbus-jose-jwt:9.41.1'
6767
api 'com.nimbusds:content-type:2.3'

Diff for: plugins/repository-azure/licenses/msal4j-1.17.1.jar.sha1

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

Diff for: plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/action/CreateQueryGroupRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
package org.opensearch.plugin.wlm.action;
1010

11-
import org.opensearch.action.ActionRequest;
1211
import org.opensearch.action.ActionRequestValidationException;
12+
import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest;
1313
import org.opensearch.cluster.metadata.QueryGroup;
1414
import org.opensearch.common.UUIDs;
1515
import org.opensearch.core.common.io.stream.StreamInput;
@@ -33,7 +33,7 @@
3333
*
3434
* @opensearch.experimental
3535
*/
36-
public class CreateQueryGroupRequest extends ActionRequest {
36+
public class CreateQueryGroupRequest extends ClusterManagerNodeRequest<CreateQueryGroupRequest> {
3737
private final QueryGroup queryGroup;
3838

3939
/**

Diff for: plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/action/TransportCreateQueryGroupAction.java

+46-7
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,82 @@
99
package org.opensearch.plugin.wlm.action;
1010

1111
import org.opensearch.action.support.ActionFilters;
12-
import org.opensearch.action.support.HandledTransportAction;
12+
import org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction;
13+
import org.opensearch.cluster.ClusterState;
14+
import org.opensearch.cluster.block.ClusterBlockException;
15+
import org.opensearch.cluster.block.ClusterBlockLevel;
16+
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
1317
import org.opensearch.common.inject.Inject;
1418
import org.opensearch.core.action.ActionListener;
19+
import org.opensearch.core.common.io.stream.StreamInput;
1520
import org.opensearch.plugin.wlm.service.QueryGroupPersistenceService;
16-
import org.opensearch.tasks.Task;
21+
import org.opensearch.threadpool.ThreadPool;
1722
import org.opensearch.transport.TransportService;
1823

24+
import java.io.IOException;
25+
26+
import static org.opensearch.threadpool.ThreadPool.Names.SAME;
27+
1928
/**
2029
* Transport action to create QueryGroup
2130
*
2231
* @opensearch.experimental
2332
*/
24-
public class TransportCreateQueryGroupAction extends HandledTransportAction<CreateQueryGroupRequest, CreateQueryGroupResponse> {
33+
public class TransportCreateQueryGroupAction extends TransportClusterManagerNodeAction<CreateQueryGroupRequest, CreateQueryGroupResponse> {
2534

2635
private final QueryGroupPersistenceService queryGroupPersistenceService;
2736

2837
/**
2938
* Constructor for TransportCreateQueryGroupAction
3039
*
31-
* @param actionName - action name
40+
* @param threadPool - {@link ThreadPool} object
3241
* @param transportService - a {@link TransportService} object
3342
* @param actionFilters - a {@link ActionFilters} object
43+
* @param indexNameExpressionResolver - {@link IndexNameExpressionResolver} object
3444
* @param queryGroupPersistenceService - a {@link QueryGroupPersistenceService} object
3545
*/
3646
@Inject
3747
public TransportCreateQueryGroupAction(
38-
String actionName,
48+
ThreadPool threadPool,
3949
TransportService transportService,
4050
ActionFilters actionFilters,
51+
IndexNameExpressionResolver indexNameExpressionResolver,
4152
QueryGroupPersistenceService queryGroupPersistenceService
4253
) {
43-
super(CreateQueryGroupAction.NAME, transportService, actionFilters, CreateQueryGroupRequest::new);
54+
super(
55+
CreateQueryGroupAction.NAME,
56+
transportService,
57+
queryGroupPersistenceService.getClusterService(),
58+
threadPool,
59+
actionFilters,
60+
CreateQueryGroupRequest::new,
61+
indexNameExpressionResolver
62+
);
4463
this.queryGroupPersistenceService = queryGroupPersistenceService;
4564
}
4665

4766
@Override
48-
protected void doExecute(Task task, CreateQueryGroupRequest request, ActionListener<CreateQueryGroupResponse> listener) {
67+
protected void clusterManagerOperation(
68+
CreateQueryGroupRequest request,
69+
ClusterState clusterState,
70+
ActionListener<CreateQueryGroupResponse> listener
71+
) {
4972
queryGroupPersistenceService.persistInClusterStateMetadata(request.getQueryGroup(), listener);
5073
}
74+
75+
@Override
76+
protected String executor() {
77+
return SAME;
78+
}
79+
80+
@Override
81+
protected CreateQueryGroupResponse read(StreamInput in) throws IOException {
82+
return new CreateQueryGroupResponse(in);
83+
}
84+
85+
@Override
86+
protected ClusterBlockException checkBlock(CreateQueryGroupRequest request, ClusterState state) {
87+
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
88+
}
89+
5190
}

Diff for: plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/action/TransportUpdateQueryGroupAction.java

+45-7
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,81 @@
99
package org.opensearch.plugin.wlm.action;
1010

1111
import org.opensearch.action.support.ActionFilters;
12-
import org.opensearch.action.support.HandledTransportAction;
12+
import org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction;
13+
import org.opensearch.cluster.ClusterState;
14+
import org.opensearch.cluster.block.ClusterBlockException;
15+
import org.opensearch.cluster.block.ClusterBlockLevel;
16+
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
1317
import org.opensearch.common.inject.Inject;
1418
import org.opensearch.core.action.ActionListener;
19+
import org.opensearch.core.common.io.stream.StreamInput;
1520
import org.opensearch.plugin.wlm.service.QueryGroupPersistenceService;
16-
import org.opensearch.tasks.Task;
21+
import org.opensearch.threadpool.ThreadPool;
1722
import org.opensearch.transport.TransportService;
1823

24+
import java.io.IOException;
25+
26+
import static org.opensearch.threadpool.ThreadPool.Names.SAME;
27+
1928
/**
2029
* Transport action to update QueryGroup
2130
*
2231
* @opensearch.experimental
2332
*/
24-
public class TransportUpdateQueryGroupAction extends HandledTransportAction<UpdateQueryGroupRequest, UpdateQueryGroupResponse> {
33+
public class TransportUpdateQueryGroupAction extends TransportClusterManagerNodeAction<UpdateQueryGroupRequest, UpdateQueryGroupResponse> {
2534

2635
private final QueryGroupPersistenceService queryGroupPersistenceService;
2736

2837
/**
2938
* Constructor for TransportUpdateQueryGroupAction
3039
*
31-
* @param actionName - action name
40+
* @param threadPool - {@link ThreadPool} object
3241
* @param transportService - a {@link TransportService} object
3342
* @param actionFilters - a {@link ActionFilters} object
43+
* @param indexNameExpressionResolver - {@link IndexNameExpressionResolver} object
3444
* @param queryGroupPersistenceService - a {@link QueryGroupPersistenceService} object
3545
*/
3646
@Inject
3747
public TransportUpdateQueryGroupAction(
38-
String actionName,
48+
ThreadPool threadPool,
3949
TransportService transportService,
4050
ActionFilters actionFilters,
51+
IndexNameExpressionResolver indexNameExpressionResolver,
4152
QueryGroupPersistenceService queryGroupPersistenceService
4253
) {
43-
super(UpdateQueryGroupAction.NAME, transportService, actionFilters, UpdateQueryGroupRequest::new);
54+
super(
55+
UpdateQueryGroupAction.NAME,
56+
transportService,
57+
queryGroupPersistenceService.getClusterService(),
58+
threadPool,
59+
actionFilters,
60+
UpdateQueryGroupRequest::new,
61+
indexNameExpressionResolver
62+
);
4463
this.queryGroupPersistenceService = queryGroupPersistenceService;
4564
}
4665

4766
@Override
48-
protected void doExecute(Task task, UpdateQueryGroupRequest request, ActionListener<UpdateQueryGroupResponse> listener) {
67+
protected void clusterManagerOperation(
68+
UpdateQueryGroupRequest request,
69+
ClusterState clusterState,
70+
ActionListener<UpdateQueryGroupResponse> listener
71+
) {
4972
queryGroupPersistenceService.updateInClusterStateMetadata(request, listener);
5073
}
74+
75+
@Override
76+
protected String executor() {
77+
return SAME;
78+
}
79+
80+
@Override
81+
protected UpdateQueryGroupResponse read(StreamInput in) throws IOException {
82+
return new UpdateQueryGroupResponse(in);
83+
}
84+
85+
@Override
86+
protected ClusterBlockException checkBlock(UpdateQueryGroupRequest request, ClusterState state) {
87+
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
88+
}
5189
}

Diff for: plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/action/UpdateQueryGroupRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
package org.opensearch.plugin.wlm.action;
1010

11-
import org.opensearch.action.ActionRequest;
1211
import org.opensearch.action.ActionRequestValidationException;
12+
import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest;
1313
import org.opensearch.cluster.metadata.QueryGroup;
1414
import org.opensearch.core.common.io.stream.StreamInput;
1515
import org.opensearch.core.common.io.stream.StreamOutput;
@@ -23,7 +23,7 @@
2323
*
2424
* @opensearch.experimental
2525
*/
26-
public class UpdateQueryGroupRequest extends ActionRequest {
26+
public class UpdateQueryGroupRequest extends ClusterManagerNodeRequest<UpdateQueryGroupRequest> {
2727
private final String name;
2828
private final MutableQueryGroupFragment mutableQueryGroupFragment;
2929

0 commit comments

Comments
 (0)