Skip to content

Commit f9c807f

Browse files
committed
rename to max_pending_connection_listeners
1 parent 8e911a4 commit f9c807f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

server/src/main/java/org/elasticsearch/transport/RemoteConnectionStrategy.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ public Writeable.Reader<RemoteConnectionInfo.ModeInfo> getReader() {
106106
Setting.Property.Dynamic));
107107

108108
// this setting is intentionally not registered, it is only used in tests
109-
public static final Setting<Integer> REMOTE_MAX_CONNECTION_QUEUE_SIZE =
110-
Setting.intSetting("cluster.remote.max_connection_queue_size", 100, Setting.Property.NodeScope);
109+
public static final Setting<Integer> REMOTE_MAX_PENDING_CONNECTION_LISTENERS =
110+
Setting.intSetting("cluster.remote.max_pending_connection_listeners", 100, Setting.Property.NodeScope);
111111

112-
private final int maxConnectionQueueSize;
112+
private final int maxPendingConnectionListeners;
113113

114114
private static final Logger logger = LogManager.getLogger(RemoteConnectionStrategy.class);
115115

@@ -126,7 +126,7 @@ public Writeable.Reader<RemoteConnectionInfo.ModeInfo> getReader() {
126126
this.clusterAlias = clusterAlias;
127127
this.transportService = transportService;
128128
this.connectionManager = connectionManager;
129-
this.maxConnectionQueueSize = REMOTE_MAX_CONNECTION_QUEUE_SIZE.get(settings);
129+
this.maxPendingConnectionListeners = REMOTE_MAX_PENDING_CONNECTION_LISTENERS.get(settings);
130130
connectionManager.addListener(this);
131131
}
132132

@@ -243,8 +243,8 @@ void connect(ActionListener<Void> connectListener) {
243243
if (closed) {
244244
assert listeners.isEmpty();
245245
} else {
246-
if (listeners.size() >= maxConnectionQueueSize) {
247-
assert listeners.size() == maxConnectionQueueSize;
246+
if (listeners.size() >= maxPendingConnectionListeners) {
247+
assert listeners.size() == maxPendingConnectionListeners;
248248
listener.onFailure(new EsRejectedExecutionException("connect listener queue is full"));
249249
return;
250250
} else {

test/framework/src/main/java/org/elasticsearch/test/InternalSettingsPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public List<Setting<?>> getSettings() {
5151
INDEX_CREATION_DATE_SETTING,
5252
PROVIDED_NAME_SETTING,
5353
TRANSLOG_RETENTION_CHECK_INTERVAL_SETTING,
54-
RemoteConnectionStrategy.REMOTE_MAX_CONNECTION_QUEUE_SIZE,
54+
RemoteConnectionStrategy.REMOTE_MAX_PENDING_CONNECTION_LISTENERS,
5555
IndexService.GLOBAL_CHECKPOINT_SYNC_INTERVAL_SETTING,
5656
IndexService.RETENTION_LEASE_SYNC_INTERVAL_SETTING,
5757
IndexSettings.FILE_BASED_RECOVERY_THRESHOLD_SETTING,

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/CcrIntegTestCase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected Settings leaderClusterSettings() {
136136
protected Settings followerClusterSettings() {
137137
final Settings.Builder builder = Settings.builder();
138138
if (randomBoolean()) {
139-
builder.put(RemoteConnectionStrategy.REMOTE_MAX_CONNECTION_QUEUE_SIZE.getKey(), randomIntBetween(1, 100));
139+
builder.put(RemoteConnectionStrategy.REMOTE_MAX_PENDING_CONNECTION_LISTENERS.getKey(), randomIntBetween(1, 100));
140140
}
141141
return builder.build();
142142
}

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/RestartIndexFollowingIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected boolean configureRemoteClusterViaNodeSettings() {
3939
protected Settings followerClusterSettings() {
4040
final Settings.Builder settings = Settings.builder().put(super.followerClusterSettings());
4141
if (randomBoolean()) {
42-
settings.put(RemoteConnectionStrategy.REMOTE_MAX_CONNECTION_QUEUE_SIZE.getKey(), 1);
42+
settings.put(RemoteConnectionStrategy.REMOTE_MAX_PENDING_CONNECTION_LISTENERS.getKey(), 1);
4343
}
4444
return settings.build();
4545
}

0 commit comments

Comments
 (0)