Class TransportVerifyShardIndexBlockAction
java.lang.Object
org.opensearch.action.support.TransportAction<TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
org.opensearch.action.support.replication.TransportReplicationAction<TransportVerifyShardIndexBlockAction.ShardRequest,TransportVerifyShardIndexBlockAction.ShardRequest,ReplicationResponse>
org.opensearch.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.
- Opensearch.internal:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Per shard requestNested classes/interfaces inherited from class org.opensearch.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 final String
static final ActionType
<ReplicationResponse> Fields inherited from class org.opensearch.action.support.replication.TransportReplicationAction
clusterService, executor, forceExecutionOnPrimary, indicesService, PRIMARY_ACTION_SUFFIX, REPLICA_ACTION_SUFFIX, REPLICATION_INITIAL_RETRY_BACKOFF_BOUND, REPLICATION_RETRY_TIMEOUT, shardStateAction, threadPool, transportOptions, transportPrimaryAction, transportReplicaAction, transportService
Fields inherited from class org.opensearch.action.support.TransportAction
actionName, 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, org.opensearch.core.action.ActionListener<org.opensearch.common.lease.Releasable> onAcquired) Executes the logic for acquiring one or more operation permit on a primary shard.protected void
acquireReplicaOperationPermit
(IndexShard replica, TransportVerifyShardIndexBlockAction.ShardRequest request, org.opensearch.core.action.ActionListener<org.opensearch.common.lease.Releasable> onAcquired, long primaryTerm, long globalCheckpoint, long maxSeqNoOfUpdateOrDeletes) Executes the logic for acquiring one or more operation permit on a replica shard.protected ReplicationResponse
newResponseInstance
(org.opensearch.core.common.io.stream.StreamInput in) protected void
shardOperationOnPrimary
(TransportVerifyShardIndexBlockAction.ShardRequest shardRequest, IndexShard primary, org.opensearch.core.action.ActionListener<TransportReplicationAction.PrimaryResult<TransportVerifyShardIndexBlockAction.ShardRequest, ReplicationResponse>> listener) Primary operation on node with primary copy.protected void
shardOperationOnReplica
(TransportVerifyShardIndexBlockAction.ShardRequest shardRequest, IndexShard replica, org.opensearch.core.action.ActionListener<TransportReplicationAction.ReplicaResult> listener) Execute the specified replica operation.Methods inherited from class org.opensearch.action.support.replication.TransportReplicationAction
adaptResponse, checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, doExecute, getIndexShard, getReplicationMode, globalBlockLevel, handlePrimaryRequest, handleReplicaRequest, indexBlockLevel, primaryTermValidationReplicasProxy, resolveRequest, retryPrimaryException, setPhase, transportOptions
Methods inherited from class org.opensearch.action.support.TransportAction
execute, execute, execute
-
Field Details
-
NAME
- See Also:
-
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
protected ReplicationResponse newResponseInstance(org.opensearch.core.common.io.stream.StreamInput in) throws IOException -
acquirePrimaryOperationPermit
protected void acquirePrimaryOperationPermit(IndexShard primary, TransportVerifyShardIndexBlockAction.ShardRequest request, org.opensearch.core.action.ActionListener<org.opensearch.common.lease.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, org.opensearch.core.action.ActionListener<org.opensearch.common.lease.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, org.opensearch.core.action.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, org.opensearch.core.action.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()
-