Skip to content

Commit 016fcaf

Browse files
author
Harsh Garg
committed
Merge branch 'main' into listShardsEmptyIndices
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
2 parents b328dbc + 9489a21 commit 016fcaf

95 files changed

Lines changed: 5303 additions & 389 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ 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 method to return dynamic SecureTransportParameters from SecureTransportSettingsProvider interface ([#16387](https://github.com/opensearch-project/OpenSearch/pull/16387)
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))
3032

3133
### Dependencies
3234
- Bump `com.azure:azure-identity` from 1.13.0 to 1.13.2 ([#15578](https://github.com/opensearch-project/OpenSearch/pull/15578))
3335
- Bump `protobuf` from 3.22.3 to 3.25.4 ([#15684](https://github.com/opensearch-project/OpenSearch/pull/15684))
3436
- 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))
3537
- Bump `peter-evans/create-pull-request` from 6 to 7 ([#15863](https://github.com/opensearch-project/OpenSearch/pull/15863))
3638
- Bump `com.nimbusds:oauth2-oidc-sdk` from 11.9.1 to 11.19.1 ([#15862](https://github.com/opensearch-project/OpenSearch/pull/15862))
37-
- Bump `com.microsoft.azure:msal4j` from 1.17.0 to 1.17.1 ([#15945](https://github.com/opensearch-project/OpenSearch/pull/15945))
39+
- 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))
3840
- 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))
3941
- Update protobuf from 3.25.4 to 3.25.5 ([#16011](https://github.com/opensearch-project/OpenSearch/pull/16011))
4042
- Bump `org.roaringbitmap:RoaringBitmap` from 1.2.1 to 1.3.0 ([#16040](https://github.com/opensearch-project/OpenSearch/pull/16040))
@@ -65,6 +67,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6567
- Code cleanup: Remove ApproximateIndexOrDocValuesQuery ([#16273](https://github.com/opensearch-project/OpenSearch/pull/16273))
6668
- Optimise clone operation for incremental full cluster snapshots ([#16296](https://github.com/opensearch-project/OpenSearch/pull/16296))
6769
- Update last seen cluster state in the commit phase ([#16215](https://github.com/opensearch-project/OpenSearch/pull/16215))
70+
- Make multiple settings dynamic for tuning on larger clusters([#16347](https://github.com/opensearch-project/OpenSearch/pull/16347))
6871

6972
### Deprecated
7073

@@ -85,10 +88,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8588
- Fix multi-search with template doesn't return status code ([#16265](https://github.com/opensearch-project/OpenSearch/pull/16265))
8689
- [Streaming Indexing] Fix intermittent 'The bulk request must be terminated by a newline [\n]' failures [#16337](https://github.com/opensearch-project/OpenSearch/pull/16337))
8790
- 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))
88-
- [Workload Management] Make query groups persistent across process restarts [#16370](https://github.com/opensearch-project/OpenSearch/pull/16370)
91+
- [Workload Management] Make query groups persistent across process restarts ([#16370](https://github.com/opensearch-project/OpenSearch/pull/16370))
92+
- [Workload Management] Enhance rejection mechanism in workload management ([#16417](https://github.com/opensearch-project/OpenSearch/pull/16417))
8993
- Fix inefficient Stream API call chains ending with count() ([#15386](https://github.com/opensearch-project/OpenSearch/pull/15386))
9094
- Fix array hashCode calculation in ResyncReplicationRequest ([#16378](https://github.com/opensearch-project/OpenSearch/pull/16378))
95+
- Fix missing fields in task index mapping to ensure proper task result storage ([#16201](https://github.com/opensearch-project/OpenSearch/pull/16201))
9196
- Fix typo super->sb in method toString() of RemoteStoreNodeAttribute ([#15362](https://github.com/opensearch-project/OpenSearch/pull/15362))
97+
- [Workload Management] Fixing Create/Update QueryGroup TransportActions to execute from non-cluster manager nodes ([16422](https://github.com/opensearch-project/OpenSearch/pull/16422))
9298

9399
### Security
94100

buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java

Lines changed: 2 additions & 2 deletions
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

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
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

plugins/repository-azure/build.gradle

Lines changed: 1 addition & 1 deletion
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'

plugins/repository-azure/licenses/msal4j-1.17.1.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+
a6211e3d71d0388929babaa0ff0951b30d001852

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

Lines changed: 2 additions & 2 deletions
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
/**

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

Lines changed: 46 additions & 7 deletions
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
}

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

Lines changed: 45 additions & 7 deletions
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
}

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

Lines changed: 2 additions & 2 deletions
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)