Module org.elasticsearch.server
Class TransportShardRefreshAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<BasicReplicationRequest,ReplicationResponse>
org.elasticsearch.action.support.replication.TransportReplicationAction<BasicReplicationRequest,ShardRefreshReplicaRequest,ReplicationResponse>
org.elasticsearch.action.admin.indices.refresh.TransportShardRefreshAction
public class TransportShardRefreshAction
extends TransportReplicationAction<BasicReplicationRequest,ShardRefreshReplicaRequest,ReplicationResponse>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classNested classes/interfaces inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
TransportReplicationAction.ConcreteReplicaRequest<R extends TransportRequest>, TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>, TransportReplicationAction.PrimaryActionExecution, TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>, TransportReplicationAction.ReplicaActionExecution, TransportReplicationAction.ReplicaResponse, TransportReplicationAction.ReplicaResult, TransportReplicationAction.ReplicasProxy, TransportReplicationAction.RetryOnReplicaException, TransportReplicationAction.SyncGlobalCheckpointAfterOperation -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final 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, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportShardRefreshAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, ProjectResolver projectResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected Tuple<ReplicationResponse, Exception> combineSplitResponses(BasicReplicationRequest originalRequest, Map<ShardId, BasicReplicationRequest> splitRequests, Map<ShardId, Tuple<ReplicationResponse, Exception>> responses) protected ReplicationResponseprotected voidshardOperationOnPrimary(BasicReplicationRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<ShardRefreshReplicaRequest, ReplicationResponse>> listener) Primary operation on node with primary copy.protected voidshardOperationOnReplica(ShardRefreshReplicaRequest request, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener) Execute the specified replica operation.protected Map<ShardId, BasicReplicationRequest> During Resharding, we might need to split the primary request.Methods inherited from class org.elasticsearch.action.support.replication.TransportReplicationAction
acquirePrimaryOperationPermit, acquireReplicaOperationPermit, adaptResponse, checkOperationLimits, checkPrimaryLimits, checkReplicaLimits, doExecute, globalBlockLevel, handlePrimaryRequest, handleReplicaRequest, indexBlockLevel, resolveRequest, retryPrimaryException, transportOptionsMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Field Details
-
NAME
- See Also:
-
TYPE
-
SOURCE_API
- See Also:
-
-
Constructor Details
-
TransportShardRefreshAction
@Inject public TransportShardRefreshAction(Settings settings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction, ActionFilters actionFilters, ProjectResolver projectResolver)
-
-
Method Details
-
newResponseInstance
- Specified by:
newResponseInstancein classTransportReplicationAction<BasicReplicationRequest,ShardRefreshReplicaRequest, ReplicationResponse> - Throws:
IOException
-
shardOperationOnPrimary
protected void shardOperationOnPrimary(BasicReplicationRequest shardRequest, IndexShard primary, ActionListener<TransportReplicationAction.PrimaryResult<ShardRefreshReplicaRequest, ReplicationResponse>> listener) Description copied from class:TransportReplicationActionPrimary operation on node with primary copy.- Specified by:
shardOperationOnPrimaryin classTransportReplicationAction<BasicReplicationRequest,ShardRefreshReplicaRequest, ReplicationResponse> - Parameters:
shardRequest- the request to the primary shardprimary- the primary shard to perform the operation on
-
splitRequestOnPrimary
protected Map<ShardId,BasicReplicationRequest> splitRequestOnPrimary(BasicReplicationRequest request) Description copied from class:TransportReplicationActionDuring Resharding, we might need to split the primary request. We are here because there was mismatch between the SplitShardCountSummary in the request and that on the primary shard node. We assume that the request is exactly 1 reshard split behind the current state. -
combineSplitResponses
protected Tuple<ReplicationResponse,Exception> combineSplitResponses(BasicReplicationRequest originalRequest, Map<ShardId, BasicReplicationRequest> splitRequests, Map<ShardId, Tuple<ReplicationResponse, Exception>> responses) -
shardOperationOnReplica
protected void shardOperationOnReplica(ShardRefreshReplicaRequest request, IndexShard replica, ActionListener<TransportReplicationAction.ReplicaResult> listener) Description copied from class:TransportReplicationActionExecute the specified replica operation. This is done under a permit fromIndexShard.acquireReplicaOperationPermit(long, long, long, ActionListener, Executor).- Specified by:
shardOperationOnReplicain classTransportReplicationAction<BasicReplicationRequest,ShardRefreshReplicaRequest, ReplicationResponse> - Parameters:
request- the request to the replica shardreplica- the replica shard to perform the operation on
-
newReplicasProxy
-