Skip to content
Merged
Show file tree
Hide file tree
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 @@ -85,15 +85,14 @@ void startComputeOnRemoteCluster(
var resp = finalResponse.get();
return Objects.requireNonNullElseGet(resp, () -> new ComputeResponse(profiles));
}))) {
var openExchangeListener = computeListener.acquireAvoid();
ExchangeService.openExchange(
transportService,
cluster.connection,
childSessionId,
queryPragmas.exchangeBufferSize(),
esqlExecutor,
EsqlCCSUtils.skipUnavailableListener(
openExchangeListener,
computeListener.acquireAvoid(),
executionInfo,
clusterAlias,
EsqlExecutionInfo.Cluster.Status.SKIPPED
Expand All @@ -104,7 +103,7 @@ void startComputeOnRemoteCluster(
computeListener,
clusterAlias,
executionInfo,
openExchangeListener
l
);

var remoteSink = exchangeService.newRemoteSink(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RemoteListenerGroup {
private <T> ActionListener<T> createCancellingListener(String reason, ActionListener<T> delegate, Runnable finishGroup) {
return ActionListener.runAfter(delegate.delegateResponse((inner, e) -> {
taskManager.cancelTaskAndDescendants(groupTask, reason, true, ActionListener.running(() -> {
EsqlCCSUtils.skipUnavailableListener(delegate, executionInfo, clusterAlias, EsqlExecutionInfo.Cluster.Status.PARTIAL)
EsqlCCSUtils.skipUnavailableListener(inner, executionInfo, clusterAlias, EsqlExecutionInfo.Cluster.Status.PARTIAL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the code, it seems like inner and delegate in this case are the same thing, am I wrong?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should, but it's more idiomatic to use the inner listener.

.onFailure(e);
}));
}), finishGroup);
Expand Down