Package org.opensearch.action.resync
Class TransportResyncReplicationAction
java.lang.Object
org.opensearch.action.support.TransportAction<ResyncReplicationRequest,ResyncReplicationResponse>
org.opensearch.action.support.replication.TransportReplicationAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
org.opensearch.action.support.replication.TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
org.opensearch.action.resync.TransportResyncReplicationAction
- All Implemented Interfaces:
PrimaryReplicaSyncer.SyncAction
public class TransportResyncReplicationAction
extends TransportWriteAction<ResyncReplicationRequest,ResyncReplicationRequest,ResyncReplicationResponse>
implements PrimaryReplicaSyncer.SyncAction
Perform replication resync
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.action.support.replication.TransportWriteAction
TransportWriteAction.WriteActionReplicasProxy, TransportWriteAction.WritePrimaryResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,
Response extends ReplicationResponse & WriteResponse>, TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>> Nested 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
Fields inherited from class org.opensearch.action.support.replication.TransportWriteAction
indexingPressureService, systemIndices
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, logger, taskManager
-
Constructor Summary
ConstructorDescriptionTransportResyncReplicationAction
(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexingPressureService indexingPressureService, SystemIndices systemIndices, org.opensearch.telemetry.tracing.Tracer tracer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
dispatchedShardOperationOnPrimary
(ResyncReplicationRequest request, IndexShard primary, org.opensearch.core.action.ActionListener<TransportReplicationAction.PrimaryResult<ResyncReplicationRequest, ResyncReplicationResponse>> listener) protected void
dispatchedShardOperationOnReplica
(ResyncReplicationRequest request, IndexShard replica, org.opensearch.core.action.ActionListener<TransportReplicationAction.ReplicaResult> listener) protected void
doExecute
(Task parentTask, ResyncReplicationRequest request, org.opensearch.core.action.ActionListener<ResyncReplicationResponse> listener) protected ClusterBlockLevel
Cluster level block to check before request execution.Index level block to check before request execution.protected ReplicationOperation.Replicas
protected ResyncReplicationResponse
newResponseInstance
(org.opensearch.core.common.io.stream.StreamInput in) static ResyncReplicationRequest
performOnPrimary
(ResyncReplicationRequest request) static Translog.Location
performOnReplica
(ResyncReplicationRequest request, IndexShard replica) protected long
protected long
void
sync
(ResyncReplicationRequest request, Task parentTask, String primaryAllocationId, long primaryTerm, org.opensearch.core.action.ActionListener<ResyncReplicationResponse> listener) Methods inherited from class org.opensearch.action.support.replication.TransportWriteAction
checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, executor, force, isSystemShard, locationToSync, shardOperationOnPrimary, shardOperationOnReplica, syncOperationResultOrThrow
Methods inherited from class org.opensearch.action.support.replication.TransportReplicationAction
acquirePrimaryOperationPermit, acquireReplicaOperationPermit, adaptResponse, getIndexShard, getReplicationMode, handlePrimaryRequest, handleReplicaRequest, primaryTermValidationReplicasProxy, resolveRequest, retryPrimaryException, setPhase, transportOptions
Methods inherited from class org.opensearch.action.support.TransportAction
execute, execute, execute
-
Constructor Details
-
TransportResyncReplicationAction
@Inject public TransportResyncReplicationAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, IndexingPressureService indexingPressureService, SystemIndices systemIndices, org.opensearch.telemetry.tracing.Tracer tracer)
-
-
Method Details
-
doExecute
protected void doExecute(Task parentTask, ResyncReplicationRequest request, org.opensearch.core.action.ActionListener<ResyncReplicationResponse> listener) -
newResponseInstance
protected ResyncReplicationResponse newResponseInstance(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Specified by:
newResponseInstance
in classTransportReplicationAction<ResyncReplicationRequest,
ResyncReplicationRequest, ResyncReplicationResponse> - Throws:
IOException
-
newReplicasProxy
-
globalBlockLevel
Description copied from class:TransportReplicationAction
Cluster level block to check before request execution. Returning null means that no blocks need to be checked. -
indexBlockLevel
Description copied from class:TransportReplicationAction
Index level block to check before request execution. Returning null means that no blocks need to be checked. -
dispatchedShardOperationOnPrimary
protected void dispatchedShardOperationOnPrimary(ResyncReplicationRequest request, IndexShard primary, org.opensearch.core.action.ActionListener<TransportReplicationAction.PrimaryResult<ResyncReplicationRequest, ResyncReplicationResponse>> listener) -
-
performOnPrimary
-
dispatchedShardOperationOnReplica
protected void dispatchedShardOperationOnReplica(ResyncReplicationRequest request, IndexShard replica, org.opensearch.core.action.ActionListener<TransportReplicationAction.ReplicaResult> listener) -
replicaOperationSize
-
performOnReplica
public static Translog.Location performOnReplica(ResyncReplicationRequest request, IndexShard replica) throws Exception - Throws:
Exception
-
sync
public void sync(ResyncReplicationRequest request, Task parentTask, String primaryAllocationId, long primaryTerm, org.opensearch.core.action.ActionListener<ResyncReplicationResponse> listener) - Specified by:
sync
in interfacePrimaryReplicaSyncer.SyncAction
-