Skip to content
Draft
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 @@ -100,6 +100,7 @@ static boolean returnSuccessWithEmptyResult(EsqlExecutionInfo executionInfo, Exc
return false;
}

// On disconnect error, check whether all remotes are marked as skip_unavailable.
if (e instanceof NoClustersToSearchException || ExceptionsHelper.isRemoteUnavailableException(e)) {
for (String clusterAlias : executionInfo.clusterAliases()) {
if (executionInfo.isSkipUnavailable(clusterAlias) == false
Expand All @@ -109,6 +110,12 @@ static boolean returnSuccessWithEmptyResult(EsqlExecutionInfo executionInfo, Exc
}
return true;
}

// If all clusters are skippable remotes, then we can return an empty result.
if (executionInfo.clusterAliases().stream().allMatch(executionInfo::isSkipUnavailable)) {
return true;
}

return false;
}

Expand Down