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/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
Modifier and TypeFieldDescriptionprotected org.apache.logging.log4j.Logger
static String
static ActionType<ReplicationResponse>
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, localConnection, taskManager
-
Constructor Summary
ConstructorDescriptionTransportVerifyShardIndexBlockAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction stateAction, ActionFilters actionFilters)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardIndexBlockAction.ShardRequest request, ActionListener<org.elasticsearch.core.Releasable> onAcquired)
Executes the logic for acquiring one or more operation permit on a primary shard.protected void
acquireReplicaOperationPermit(IndexShard replica, TransportVerifyShardIndexBlockAction.ShardRequest request, ActionListener<org.elasticsearch.core.Releasable> onAcquired, long primaryTerm, long globalCheckpoint, long maxSeqNoOfUpdateOrDeletes)
Executes the logic for acquiring one or more operation permit on a replica shard.protected ReplicationResponse
protected void
shardOperationOnPrimary(TransportVerifyShardIndexBlockAction.ShardRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>> listener)
Primary operation on node with primary copy.protected void
shardOperationOnReplica(TransportVerifyShardIndexBlockAction.ShardRequest shardRequest, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener)
Execute the specified replica operation.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
- 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
-
acquirePrimaryOperationPermit
protected void acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardIndexBlockAction.ShardRequest request, ActionListener<org.elasticsearch.core.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<org.elasticsearch.core.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()
-