Skip to content

Remove some Dead Code in o.e.transport #44653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ final class RemoteClusterConnection implements TransportConnectionListener, Clos
private volatile boolean skipUnavailable;
private final ConnectHandler connectHandler;
private final TimeValue initialConnectionTimeout;
private SetOnce<ClusterName> remoteClusterName = new SetOnce<>();
private final SetOnce<ClusterName> remoteClusterName = new SetOnce<>();

/**
* Creates a new {@link RemoteClusterConnection}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
import org.elasticsearch.common.component.LifecycleComponent;
import org.elasticsearch.common.transport.BoundTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
import org.elasticsearch.common.util.concurrent.ConcurrentMapLong;

import java.io.Closeable;
import java.io.IOException;
import java.net.UnknownHostException;
Expand Down Expand Up @@ -74,10 +73,6 @@ public interface Transport extends LifecycleComponent {
*/
List<String> getDefaultSeedAddresses();

default CircuitBreaker getInFlightRequestBreaker() {
return new NoopCircuitBreaker("in-flight-noop");
}

/**
* Opens a new connection to the given node. When the connection is fully connected, the listener is called.
* The ActionListener will be called on the calling thread or the generic thread pool.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ protected void doRun() throws Exception {
}

private void sendLocalRequest(long requestId, final String action, final TransportRequest request, TransportRequestOptions options) {
final DirectResponseChannel channel = new DirectResponseChannel(logger, localNode, action, requestId, this, threadPool);
final DirectResponseChannel channel = new DirectResponseChannel(localNode, action, requestId, this, threadPool);
try {
onRequestSent(localNode, requestId, action, request, options);
onRequestReceived(requestId, action);
Expand Down Expand Up @@ -1131,16 +1131,13 @@ void setTimeoutHandler(TimeoutHandler handler) {
}

static class DirectResponseChannel implements TransportChannel {
final Logger logger;
final DiscoveryNode localNode;
private final String action;
private final long requestId;
final TransportService service;
final ThreadPool threadPool;

DirectResponseChannel(Logger logger, DiscoveryNode localNode, String action, long requestId, TransportService service,
ThreadPool threadPool) {
this.logger = logger;
DirectResponseChannel(DiscoveryNode localNode, String action, long requestId, TransportService service, ThreadPool threadPool) {
this.localNode = localNode;
this.action = action;
this.requestId = requestId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,4 @@ public final class TransportSettings {

private TransportSettings() {
}

private static <T> Setting<T> fallback(String key, Setting.AffixSetting<T> affixSetting, String regex, String replacement) {
return "_na_".equals(key) ? affixSetting.getConcreteSettingForNamespace(key)
: affixSetting.getConcreteSetting(key.replaceAll(regex, replacement));
}
}