Skip to content

Commit d2d0636

Browse files
fix: do not let _resolve/cluster hang if remote is unresponsive (#119516)
* fix: do not let `_resolve/cluster` hang if remote is unresponsive Previously, `_resolve/cluster` would wait for a response from a remote as part of the connection strategy. If the remote were to be unresponsive, this API would wait until `netty` would terminate the connection with a handshake exception. The threshold for terminating the connection is `10s`. This means that the API would wait for `10s` before determining that the remote is unresponsive. This strategy is now replaced with a fail fast where a response is sent back to the user immediately rather than waiting for a connection termination. * Update docs/changelog/119516.yaml
1 parent 34ab4a4 commit d2d0636

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/changelog/119516.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 119516
2+
summary: "Fix: do not let `_resolve/cluster` hang if remote is unresponsive"
3+
area: Search
4+
type: bug
5+
issues: []

server/src/main/java/org/elasticsearch/action/admin/indices/resolve/TransportResolveClusterAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected void doExecuteForked(Task task, ResolveClusterActionRequest request, A
141141
RemoteClusterClient remoteClusterClient = remoteClusterService.getRemoteClusterClient(
142142
clusterAlias,
143143
searchCoordinationExecutor,
144-
RemoteClusterService.DisconnectedStrategy.RECONNECT_IF_DISCONNECTED
144+
RemoteClusterService.DisconnectedStrategy.FAIL_IF_DISCONNECTED
145145
);
146146
var remoteRequest = new ResolveClusterActionRequest(originalIndices.indices(), request.indicesOptions());
147147
// allow cancellation requests to propagate to remote clusters

0 commit comments

Comments
 (0)