Skip to content

Commit

Permalink
[Backport 2.4]Revert "Cluster manager task throttling feature [Final …
Browse files Browse the repository at this point in the history
…PR] (#5071)  (#5203)

* Revert "Cluster manager task throttling feature [Final PR] (#4986) (#5071)"

This reverts commit e0d1c2e.

Signed-off-by: Bukhtawar Khan <[email protected]>

* Fix up change log

Signed-off-by: Bukhtawar Khan <[email protected]>

* Fix up release notes

Signed-off-by: Bukhtawar Khan <[email protected]>

* Cleaning up the deleted file

Signed-off-by: Bukhtawar Khan <[email protected]>

Signed-off-by: Bukhtawar Khan <[email protected]>
  • Loading branch information
Bukhtawar authored Nov 10, 2022
1 parent c65c551 commit 94c5bd7
Show file tree
Hide file tree
Showing 50 changed files with 92 additions and 2,053 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Introduce point in time search feature ([#3959](https://github.com/opensearch-project/OpenSearch/issues/3959))
- Introduce experimental searchable snapshot feature ([#2919](https://github.com/opensearch-project/OpenSearch/issues/2919))
- Add API for decommissioning/recommissioning zone and weighted zonal search request routing policy ([#3639](https://github.com/opensearch-project/OpenSearch/issues/3639))
- Introduce cluster manager task throttling framework [#479](https://github.com/opensearch-project/OpenSearch/issues/479)
- Add support for s390x architecture ([#4001](https://github.com/opensearch-project/OpenSearch/pull/4001))
- Github workflow for changelog verification ([#4085](https://github.com/opensearch-project/OpenSearch/pull/4085))
- Add failover support with Segment Replication enabled. ([#4325](https://github.com/opensearch-project/OpenSearch/pull/4325)
Expand Down
1 change: 0 additions & 1 deletion release-notes/opensearch.release-notes-2.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- Introduce point in time search feature ([#3959](https://github.com/opensearch-project/OpenSearch/issues/3959))
- Introduce experimental searchable snapshot feature ([#2919](https://github.com/opensearch-project/OpenSearch/issues/2919))
- Add API for decommissioning/recommissioning zone and weighted zonal search request routing policy ([#3639](https://github.com/opensearch-project/OpenSearch/issues/3639))
- Introduce cluster manager task throttling framework [#479](https://github.com/opensearch-project/OpenSearch/issues/479)
- Add support for s390x architecture ([#4001](https://github.com/opensearch-project/OpenSearch/pull/4001))
- Github workflow for changelog verification ([#4085](https://github.com/opensearch-project/OpenSearch/pull/4085))
- Add failover support with Segment Replication enabled. ([#4325](https://github.com/opensearch-project/OpenSearch/pull/4325)
Expand Down

This file was deleted.

7 changes: 0 additions & 7 deletions server/src/main/java/org/opensearch/OpenSearchException.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import org.opensearch.action.support.replication.ReplicationOperation;
import org.opensearch.cluster.action.shard.ShardStateAction;
import org.opensearch.cluster.service.ClusterManagerThrottlingException;
import org.opensearch.common.CheckedFunction;
import org.opensearch.common.Nullable;
import org.opensearch.common.ParseField;
Expand Down Expand Up @@ -1620,12 +1619,6 @@ private enum OpenSearchExceptionHandle {
org.opensearch.cluster.decommission.NodeDecommissionedException::new,
164,
V_2_4_0
),
CLUSTER_MANAGER_TASK_THROTTLED_EXCEPTION(
ClusterManagerThrottlingException.class,
ClusterManagerThrottlingException::new,
165,
Version.V_2_4_0
);

final Class<? extends OpenSearchException> exceptionClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
import org.opensearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand;
import org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand;
import org.opensearch.cluster.routing.allocation.command.AllocationCommand;
import org.opensearch.cluster.service.ClusterManagerTaskKeys;
import org.opensearch.cluster.service.ClusterManagerTaskThrottler;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.Priority;
import org.opensearch.common.Strings;
Expand All @@ -82,7 +80,6 @@ public class TransportClusterRerouteAction extends TransportClusterManagerNodeAc
private static final Logger logger = LogManager.getLogger(TransportClusterRerouteAction.class);

private final AllocationService allocationService;
private static ClusterManagerTaskThrottler.ThrottlingKey clusterRerouteTaskKey;

@Inject
public TransportClusterRerouteAction(
Expand All @@ -103,8 +100,6 @@ public TransportClusterRerouteAction(
indexNameExpressionResolver
);
this.allocationService = allocationService;
// Task is onboarded for throttling, it will get retried from associated TransportClusterManagerNodeAction.
clusterRerouteTaskKey = clusterService.registerClusterManagerTask(ClusterManagerTaskKeys.CLUSTER_REROUTE_API_KEY, true);
}

@Override
Expand Down Expand Up @@ -246,11 +241,6 @@ static class ClusterRerouteResponseAckedClusterStateUpdateTask extends AckedClus
this.allocationService = allocationService;
}

@Override
public ClusterManagerTaskThrottler.ThrottlingKey getClusterManagerThrottlingKey() {
return clusterRerouteTaskKey;
}

@Override
protected ClusterRerouteResponse newResponse(boolean acknowledged) {
return new ClusterRerouteResponse(acknowledged, clusterStateToSend, explanations);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.routing.allocation.AllocationService;
import org.opensearch.cluster.service.ClusterManagerTaskKeys;
import org.opensearch.cluster.service.ClusterManagerTaskThrottler;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.Nullable;
import org.opensearch.common.Priority;
Expand All @@ -75,8 +73,6 @@ public class TransportClusterUpdateSettingsAction extends TransportClusterManage

private final ClusterSettings clusterSettings;

private final ClusterManagerTaskThrottler.ThrottlingKey clusterUpdateSettingTaskKey;

@Inject
public TransportClusterUpdateSettingsAction(
TransportService transportService,
Expand All @@ -99,10 +95,6 @@ public TransportClusterUpdateSettingsAction(
);
this.allocationService = allocationService;
this.clusterSettings = clusterSettings;

// Task is onboarded for throttling, it will get retried from associated TransportClusterManagerNodeAction.
clusterUpdateSettingTaskKey = clusterService.registerClusterManagerTask(ClusterManagerTaskKeys.CLUSTER_UPDATE_SETTINGS_KEY, true);

}

@Override
Expand Down Expand Up @@ -144,11 +136,6 @@ protected void clusterManagerOperation(

private volatile boolean changed = false;

@Override
public ClusterManagerTaskThrottler.ThrottlingKey getClusterManagerThrottlingKey() {
return clusterUpdateSettingTaskKey;
}

@Override
protected ClusterUpdateSettingsResponse newResponse(boolean acknowledged) {
return new ClusterUpdateSettingsResponse(acknowledged, updater.getTransientUpdates(), updater.getPersistentUpdate());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
import org.opensearch.cluster.block.ClusterBlockException;
import org.opensearch.cluster.block.ClusterBlockLevel;
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.service.ClusterManagerTaskKeys;
import org.opensearch.cluster.service.ClusterManagerTaskThrottler;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.inject.Inject;
import org.opensearch.common.io.stream.StreamInput;
Expand All @@ -59,7 +57,6 @@
public class TransportDeleteStoredScriptAction extends TransportClusterManagerNodeAction<DeleteStoredScriptRequest, AcknowledgedResponse> {

private final ScriptService scriptService;
private final ClusterManagerTaskThrottler.ThrottlingKey deleteScriptTaskKey;

@Inject
public TransportDeleteStoredScriptAction(
Expand All @@ -80,8 +77,6 @@ public TransportDeleteStoredScriptAction(
indexNameExpressionResolver
);
this.scriptService = scriptService;
// Task is onboarded for throttling, it will get retried from associated TransportClusterManagerNodeAction.
deleteScriptTaskKey = clusterService.registerClusterManagerTask(ClusterManagerTaskKeys.DELETE_SCRIPT_KEY, true);
}

@Override
Expand All @@ -100,7 +95,7 @@ protected void clusterManagerOperation(
ClusterState state,
ActionListener<AcknowledgedResponse> listener
) throws Exception {
scriptService.deleteStoredScript(clusterService, request, deleteScriptTaskKey, listener);
scriptService.deleteStoredScript(clusterService, request, listener);
}

@Override
Expand Down
Loading

0 comments on commit 94c5bd7

Please sign in to comment.