Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass the task to broadcast actions #29672

Merged
merged 3 commits into from
May 7, 2018
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 @@ -148,7 +148,7 @@ protected ValidateQueryResponse newResponse(ValidateQueryRequest request, Atomic
}

@Override
protected ShardValidateQueryResponse shardOperation(ShardValidateQueryRequest request) throws IOException {
protected ShardValidateQueryResponse shardOperation(ShardValidateQueryRequest request, Task task) throws IOException {
boolean valid;
String explanation = null;
String error = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ protected final void doExecute(Request request, ActionListener<Response> listene

protected abstract ShardResponse newShardResponse();

protected abstract ShardResponse shardOperation(ShardRequest request) throws IOException;

protected ShardResponse shardOperation(ShardRequest request, Task task) throws IOException {
return shardOperation(request);
}
protected abstract ShardResponse shardOperation(ShardRequest request, Task task) throws IOException;

/**
* Determines the shards this operation will be executed on. The operation is executed once per shard iterator, typically
Expand Down Expand Up @@ -284,7 +280,7 @@ class ShardTransportHandler implements TransportRequestHandler<ShardRequest> {

@Override
public void messageReceived(ShardRequest request, TransportChannel channel, Task task) throws Exception {
channel.sendResponse(shardOperation(request));
channel.sendResponse(shardOperation(request, task));
}

@Override
Expand Down