Ensure enrich executes on master node only (#46448)
The previous transport action was a read action, which under the right set of circumstances can execute on a coordinating node. This commit ensures that cannot happen.
This commit is contained in:
parent
c057fce978
commit
9304f5c889
|
@ -8,7 +8,7 @@ package org.elasticsearch.xpack.core.enrich.action;
|
|||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.action.support.master.MasterNodeReadRequest;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
|
@ -24,7 +24,7 @@ public class ExecuteEnrichPolicyAction extends ActionType<AcknowledgedResponse>
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
public static class Request extends MasterNodeReadRequest<Request> {
|
||||
public static class Request extends MasterNodeRequest<Request> {
|
||||
|
||||
private final String name;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.elasticsearch.xpack.enrich.action;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -25,7 +25,7 @@ import org.elasticsearch.xpack.enrich.PolicyExecutionResult;
|
|||
import java.io.IOException;
|
||||
|
||||
public class TransportExecuteEnrichPolicyAction
|
||||
extends TransportMasterNodeReadAction<ExecuteEnrichPolicyAction.Request, AcknowledgedResponse> {
|
||||
extends TransportMasterNodeAction<ExecuteEnrichPolicyAction.Request, AcknowledgedResponse> {
|
||||
|
||||
private final EnrichPolicyExecutor executor;
|
||||
|
||||
|
|
Loading…
Reference in New Issue