Skip to content

Commit

Permalink
Remove gRPC feature flag. Redundant for a plugin.
Browse files Browse the repository at this point in the history
Signed-off-by: Finn Carroll <[email protected]>
  • Loading branch information
finnegancarroll committed Dec 17, 2024
1 parent 0056342 commit f0932e9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.FeatureFlags;
import org.opensearch.core.indices.breaker.CircuitBreakerService;
import org.opensearch.plugins.NetworkPlugin;
import org.opensearch.plugins.Plugin;
Expand Down Expand Up @@ -45,9 +44,6 @@ public Map<String, Supplier<AuxTransport>> getAuxTransports(
ClusterSettings clusterSettings,
Tracer tracer
) {
if (FeatureFlags.isEnabled(FeatureFlags.GRPC_ENABLE_SETTING) == false) {
throw new IllegalArgumentException("transport-grpc is experimental and feature flag must be enabled before use");
}
return Collections.singletonMap(
GRPC_TRANSPORT_SETTING_KEY,
() -> new Netty4GrpcServerTransport(settings, Collections.emptyList(), networkService)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ protected FeatureFlagSettings(
FeatureFlags.STAR_TREE_INDEX_SETTING,
FeatureFlags.APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING,
FeatureFlags.READER_WRITER_SPLIT_EXPERIMENTAL_SETTING,
FeatureFlags.TERM_VERSION_PRECOMMIT_ENABLE_SETTING,
FeatureFlags.GRPC_ENABLE_SETTING
FeatureFlags.TERM_VERSION_PRECOMMIT_ENABLE_SETTING
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ public class FeatureFlags {
Property.NodeScope
);

/**
* Gates the functionality of the Netty4 gRPC server.
*/
public static final String GRPC_EXPERIMENTAL = "opensearch.experimental.feature.grpc.enabled";
public static final Setting<Boolean> GRPC_ENABLE_SETTING = Setting.boolSetting(GRPC_EXPERIMENTAL, false, Property.NodeScope);

private static final List<Setting<Boolean>> ALL_FEATURE_FLAG_SETTINGS = List.of(
REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING,
EXTENSIONS_SETTING,
Expand All @@ -144,8 +138,7 @@ public class FeatureFlags {
STAR_TREE_INDEX_SETTING,
APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING,
READER_WRITER_SPLIT_EXPERIMENTAL_SETTING,
TERM_VERSION_PRECOMMIT_ENABLE_SETTING,
GRPC_ENABLE_SETTING
TERM_VERSION_PRECOMMIT_ENABLE_SETTING
);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import static java.net.InetAddress.getByName;
import static java.util.Arrays.asList;
import static org.opensearch.transport.TcpTransport.resolvePublishPort;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

public class PublishPortTests extends OpenSearchTestCase {
Expand Down

0 comments on commit f0932e9

Please sign in to comment.