Class TransportVerifyShardIndexBlockAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.replication.TransportReplicationAction<TransportVerifyShardIndexBlockAction.ShardRequest,TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
org.elasticsearch.action.admin.indices.readonly.TransportVerifyShardIndexBlockAction
public class TransportVerifyShardIndexBlockAction extends TransportReplicationAction<TransportVerifyShardIndexBlockAction.ShardRequest,TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
Action used to verify whether shards have properly applied a given index block,
and are no longer executing any operations in violation of that block. This action
requests all operation permits of the shard in order to wait for all write operations
to complete.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransportVerifyShardIndexBlockAction.ShardRequest
Nested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
TransportReplicationAction.ConcreteReplicaRequest<R extends TransportRequest>, TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaResponse, TransportReplicationAction.ReplicaResult, TransportReplicationAction.ReplicasProxy, TransportReplicationAction.RetryOnReplicaException
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
logger
static java.lang.String
NAME
static ActionType<ReplicationResponse>
TYPE
Fields inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
clusterService, executor, forceExecutionOnPrimary, indicesService, REPLICATION_INITIAL_RETRY_BACKOFF_BOUND, REPLICATION_RETRY_TIMEOUT, shardStateAction, threadPool, transportOptions, transportPrimaryAction, transportReplicaAction, transportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
Constructors Constructor Description TransportVerifyShardIndexBlockAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters)
-
Method Summary
Methods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
adaptResponse, checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, doExecute, globalBlockLevel, handlePrimaryRequest, handleReplicaRequest, indexBlockLevel, resolveRequest, retryPrimaryException, transportOptions
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
Field Details
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
TYPE
-
logger
protected org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
TransportVerifyShardIndexBlockAction
@Inject public TransportVerifyShardIndexBlockAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters)
-
-
Method Details
-
newResponseInstance
- Specified by:
newResponseInstance
in classTransportReplicationAction<TransportVerifyShardIndexBlockAction.ShardRequest,TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
- Throws:
java.io.IOException
-
acquirePrimaryOperationPermit
protected void acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardIndexBlockAction.ShardRequest request, ActionListener<Releasable> onAcquired)Description copied from class:TransportReplicationAction
Executes the logic for acquiring one or more operation permit on a primary shard. The default is to acquire a single permit but this method can be overridden to acquire more. -
acquireReplicaOperationPermit
protected void acquireReplicaOperationPermit(IndexShard replica, TransportVerifyShardIndexBlockAction.ShardRequest request, ActionListener<Releasable> onAcquired, long primaryTerm, long globalCheckpoint, long maxSeqNoOfUpdateOrDeletes)Description copied from class:TransportReplicationAction
Executes the logic for acquiring one or more operation permit on a replica shard. The default is to acquire a single permit but this method can be overridden to acquire more. -
shardOperationOnPrimary
protected void shardOperationOnPrimary(TransportVerifyShardIndexBlockAction.ShardRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>> listener)Description copied from class:TransportReplicationAction
Primary operation on node with primary copy.- Specified by:
shardOperationOnPrimary
in classTransportReplicationAction<TransportVerifyShardIndexBlockAction.ShardRequest,TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
- Parameters:
shardRequest
- the request to the primary shardprimary
- the primary shard to perform the operation on
-
shardOperationOnReplica
protected void shardOperationOnReplica(TransportVerifyShardIndexBlockAction.ShardRequest shardRequest, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener)Description copied from class:TransportReplicationAction
Execute the specified replica operation. This is done under a permit fromIndexShard.acquireReplicaOperationPermit(long, long, long, ActionListener, String, Object)
.- Specified by:
shardOperationOnReplica
in classTransportReplicationAction<TransportVerifyShardIndexBlockAction.ShardRequest,TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
- Parameters:
shardRequest
- the request to the replica shardreplica
- the replica shard to perform the operation on
-
newReplicasProxy
protected ReplicationOperation.Replicas<TransportVerifyShardIndexBlockAction.ShardRequest> newReplicasProxy()
-