Skip to content

Commit

Permalink
ExtensionProxyAction is dead! Long live ExtensionAction!
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Mar 17, 2023
1 parent 3545812 commit 7c8061e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 54 deletions.
14 changes: 3 additions & 11 deletions server/src/main/java/org/opensearch/action/ActionModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.extensions.ExtensionsManager;
import org.opensearch.extensions.action.ExtensionAction;
import org.opensearch.extensions.action.ExtensionProxyAction;
import org.opensearch.extensions.action.ExtensionTransportAction;
import org.opensearch.common.settings.IndexScopedSettings;
import org.opensearch.common.settings.Settings;
Expand Down Expand Up @@ -718,13 +717,6 @@ public <Request extends ActionRequest, Response extends ActionResponse> void reg
// Remote Store
actions.register(RestoreRemoteStoreAction.INSTANCE, TransportRestoreRemoteStoreAction.class);

// TODO: Remove this and its tests, it is no longer used
// Need to migrate its NAME prefix to the dynamic action name
if (FeatureFlags.isEnabled(FeatureFlags.EXTENSIONS)) {
// ExtensionProxyAction
actions.register(ExtensionProxyAction.INSTANCE, ExtensionTransportAction.class);
}

// Decommission actions
actions.register(DecommissionAction.INSTANCE, TransportDecommissionAction.class);
actions.register(GetDecommissionStateAction.INSTANCE, TransportGetDecommissionStateAction.class);
Expand Down Expand Up @@ -992,17 +984,17 @@ public RestController getRestController() {
* @opensearch.internal
*/
public static class DynamicActionRegistry {
// the immutable map of injected transport actions
// will be initialized with the immutable map of injected transport actions
private Map<ActionType, TransportAction> actions = Collections.emptyMap();
// the dynamic map which can be updated over time
// the dynamic map which can be updated over time after initialization
private final Map<ExtensionAction, ExtensionTransportAction> registry = new ConcurrentHashMap<>();

private ActionFilters actionFilters;
private ExtensionsManager extensionsManager;
private TransportService transportService;

/**
* Initialize the immutable actions in the registry.
* Initialize the immutable actions in the registry and provide parameters needed for dynamic actions.
*
* @param actions The injected map of {@link ActionType} to {@link TransportAction}
* @param actionFilters The action filters
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 7c8061e

Please sign in to comment.