From edf0a3f9f9212c36bb970c5da6449e4c67a9c389 Mon Sep 17 00:00:00 2001 From: Pawan Kartik Date: Fri, 3 Jan 2025 15:08:18 +0000 Subject: [PATCH 1/2] 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. --- .../admin/indices/resolve/TransportResolveClusterAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/resolve/TransportResolveClusterAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/resolve/TransportResolveClusterAction.java index c30a2a44274a7..e3e737595cac6 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/resolve/TransportResolveClusterAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/resolve/TransportResolveClusterAction.java @@ -141,7 +141,7 @@ protected void doExecuteForked(Task task, ResolveClusterActionRequest request, A RemoteClusterClient remoteClusterClient = remoteClusterService.getRemoteClusterClient( clusterAlias, searchCoordinationExecutor, - RemoteClusterService.DisconnectedStrategy.RECONNECT_IF_DISCONNECTED + RemoteClusterService.DisconnectedStrategy.FAIL_IF_DISCONNECTED ); var remoteRequest = new ResolveClusterActionRequest(originalIndices.indices(), request.indicesOptions()); // allow cancellation requests to propagate to remote clusters From 7897d4b475a70cc89248509bc035ef5d0ff8a2c7 Mon Sep 17 00:00:00 2001 From: Pawan Kartik Date: Fri, 3 Jan 2025 15:30:17 +0000 Subject: [PATCH 2/2] Update docs/changelog/119516.yaml --- docs/changelog/119516.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/changelog/119516.yaml diff --git a/docs/changelog/119516.yaml b/docs/changelog/119516.yaml new file mode 100644 index 0000000000000..06dd5168a0823 --- /dev/null +++ b/docs/changelog/119516.yaml @@ -0,0 +1,5 @@ +pr: 119516 +summary: "Fix: do not let `_resolve/cluster` hang if remote is unresponsive" +area: Search +type: bug +issues: []