@@ -106,10 +106,10 @@ public Writeable.Reader<RemoteConnectionInfo.ModeInfo> getReader() {
106
106
Setting .Property .Dynamic ));
107
107
108
108
// 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 );
111
111
112
- private final int maxConnectionQueueSize ;
112
+ private final int maxPendingConnectionListeners ;
113
113
114
114
private static final Logger logger = LogManager .getLogger (RemoteConnectionStrategy .class );
115
115
@@ -126,7 +126,7 @@ public Writeable.Reader<RemoteConnectionInfo.ModeInfo> getReader() {
126
126
this .clusterAlias = clusterAlias ;
127
127
this .transportService = transportService ;
128
128
this .connectionManager = connectionManager ;
129
- this .maxConnectionQueueSize = REMOTE_MAX_CONNECTION_QUEUE_SIZE .get (settings );
129
+ this .maxPendingConnectionListeners = REMOTE_MAX_PENDING_CONNECTION_LISTENERS .get (settings );
130
130
connectionManager .addListener (this );
131
131
}
132
132
@@ -243,8 +243,8 @@ void connect(ActionListener<Void> connectListener) {
243
243
if (closed ) {
244
244
assert listeners .isEmpty ();
245
245
} else {
246
- if (listeners .size () >= maxConnectionQueueSize ) {
247
- assert listeners .size () == maxConnectionQueueSize ;
246
+ if (listeners .size () >= maxPendingConnectionListeners ) {
247
+ assert listeners .size () == maxPendingConnectionListeners ;
248
248
listener .onFailure (new EsRejectedExecutionException ("connect listener queue is full" ));
249
249
return ;
250
250
} else {
0 commit comments