com.groupbyinc.flux.action.support.replication.TransportReplicationAction$ReroutePhase.class Maven / Gradle / Ivy
???? 4u Vcom/groupbyinc/flux/action/support/replication/TransportReplicationAction$ReroutePhase ;com/groupbyinc/flux/common/util/concurrent/AbstractRunnable TransportReplicationAction.java Icom/groupbyinc/flux/action/support/replication/TransportReplicationAction ReroutePhase Xcom/groupbyinc/flux/action/support/replication/TransportReplicationAction$ReroutePhase$2 Xcom/groupbyinc/flux/action/support/replication/TransportReplicationAction$ReroutePhase$1 ^com/groupbyinc/flux/action/support/replication/TransportReplicationAction$ConcreteShardRequest
ConcreteShardRequest 8com/groupbyinc/flux/cluster/metadata/IndexMetaData$State 2com/groupbyinc/flux/cluster/metadata/IndexMetaData State 9com/groupbyinc/flux/cluster/ClusterStateObserver$Listener 0com/groupbyinc/flux/cluster/ClusterStateObserver Listener %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup listener +Lcom/groupbyinc/flux/action/ActionListener; 7Lcom/groupbyinc/flux/action/ActionListener; request CLcom/groupbyinc/flux/action/support/replication/ReplicationRequest; TRequest; task @Lcom/groupbyinc/flux/action/support/replication/ReplicationTask; observer 2Lcom/groupbyinc/flux/cluster/ClusterStateObserver; finished +Ljava/util/concurrent/atomic/AtomicBoolean; $assertionsDisabled Z this$0 KLcom/groupbyinc/flux/action/support/replication/TransportReplicationAction; ?(Lcom/groupbyinc/flux/action/support/replication/TransportReplicationAction;Lcom/groupbyinc/flux/action/support/replication/ReplicationTask;Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;Lcom/groupbyinc/flux/action/ActionListener;)V - . 1 ()V / 3
4 )java/util/concurrent/atomic/AtomicBoolean 6
7 4 ) * 9 " # ; clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService; = > ? 2com/groupbyinc/flux/cluster/service/ClusterService A localNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; C D
B E .com/groupbyinc/flux/cluster/node/DiscoveryNode G getId ()Ljava/lang/String; I J
H K >com/groupbyinc/flux/action/support/replication/ReplicationTask M ()J I O
N P Acom/groupbyinc/flux/action/support/replication/ReplicationRequest R
setParentTask (Ljava/lang/String;J)V T U
S V )com/groupbyinc/flux/action/ActionListener X Z % & \ timeout -()Lcom/groupbyinc/flux/common/unit/TimeValue; ^ _
S ` access$2800 ?(Lcom/groupbyinc/flux/action/support/replication/TransportReplicationAction;)Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; b c
d access$2900 x(Lcom/groupbyinc/flux/action/support/replication/TransportReplicationAction;)Lcom/groupbyinc/flux/threadpool/ThreadPool; f g
h )com/groupbyinc/flux/threadpool/ThreadPool j getThreadContext <()Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext; l m
k n ?(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)V / p
q ' ( s this }Lcom/groupbyinc/flux/action/support/replication/TransportReplicationAction.ReroutePhase; XLcom/groupbyinc/flux/action/support/replication/TransportReplicationAction$ReroutePhase; onFailure (Ljava/lang/Exception;)V finishWithUnexpectedFailure z y
{ e Ljava/lang/Exception; doRun routing ? setPhase U(Lcom/groupbyinc/flux/action/support/replication/ReplicationTask;Ljava/lang/String;)V ? ?
? setAndGetObservedState ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? ?
? handleBlockExceptions -(Lcom/groupbyinc/flux/cluster/ClusterState;)Z ? ?
? (com/groupbyinc/flux/cluster/ClusterState ?
concreteIndex >(Lcom/groupbyinc/flux/cluster/ClusterState;)Ljava/lang/String; ? ?
? metaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ?
? ? -com/groupbyinc/flux/cluster/metadata/MetaData ? index H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; ? ?
? ? 0com/groupbyinc/flux/index/IndexNotFoundException ? (Ljava/lang/String;)V / ?
? ? retry ? y
? java/lang/String ? getState <()Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData$State; ? ?
? CLOSE :Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData$State; ? ? ? 0com/groupbyinc/flux/indices/IndexClosedException ? getIndex #()Lcom/groupbyinc/flux/index/Index; ? ?
? $(Lcom/groupbyinc/flux/index/Index;)V / ?
? ? resolveRequest z(Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;)V ? ?
? + , ? shardId +()Lcom/groupbyinc/flux/index/shard/ShardId; ? ?
S ? java/lang/AssertionError ? -request shardId must be set in resolveRequest ? (Ljava/lang/Object;)V / ?
? ? waitForActiveShards 7()Lcom/groupbyinc/flux/action/support/ActiveShardCount; ? ?
S ? 3com/groupbyinc/flux/action/support/ActiveShardCount ? DEFAULT 5Lcom/groupbyinc/flux/action/support/ActiveShardCount; ? ? ? ? 9request waitForActiveShards must be set in resolveRequest ? primary ^(Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/routing/ShardRouting; ? ?
? retryIfUnavailable _(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Z ? ?
? 0com/groupbyinc/flux/cluster/routing/ShardRouting ? nodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ? ?
? ?
currentNodeId ? J
? ? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ? get D(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? getLocalNodeId ? J
? ? equals (Ljava/lang/Object;)Z ? ?
? ? performLocalAction ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;)V ? ?
? performRemoteAction ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)V ? ?
? state *Lcom/groupbyinc/flux/cluster/ClusterState; Ljava/lang/String;
indexMetaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; node 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; waiting_on_primary access$3000 c
6com/groupbyinc/flux/common/apache/logging/log4j/Logger isTraceEnabled ()Z
access$3100 c
`send action [{}] to local primary [{}] for request [{}] with cluster state version [{}] to [{}] transportPrimaryAction ? version O
? java/lang/Long valueOf (J)Ljava/lang/Long;
trace o(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V !
" allocationId 4()Lcom/groupbyinc/flux/cluster/routing/AllocationId;$%
?& 0com/groupbyinc/flux/cluster/routing/AllocationId(
) K id ()I+,
?- primaryTerm (I)J/0
1 F(Lcom/groupbyinc/flux/transport/TransportRequest;Ljava/lang/String;J)V /3
4
performAction v(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;ZLcom/groupbyinc/flux/transport/TransportRequest;)V67
8 routedBasedOnClusterVersion: O
S; access$3200= c
> ?failed to find primary [{}] for request [{}] despite sender thinking it would be here. Local cluster state version [{}]] is older than on sending node (version [{}]), scheduling a retry...@ ](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V B
C java/lang/StringBuilderE
F 4 >failed to find primary as current cluster state with version [H append -(Ljava/lang/String;)Ljava/lang/StringBuilder;JK
FL (J)Ljava/lang/StringBuilder;JN
FO ] is stale (expected at least [Q ]S toStringU J
FV retryBecauseUnavailable >(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;)VXY
Z F(J)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;:\
S] access$3300_ c
` access$3500b c
c Ysend action [{}] on primary [{}] for request [{}] with cluster state version [{}] to [{}]e access$3400 _(Lcom/groupbyinc/flux/action/support/replication/TransportReplicationAction;)Ljava/lang/String;gh
i reroutedk access$3600mh
n activep
?q access$3800s c
t oprimary shard [{}] is not yet active, scheduling a retry: action [{}], request [{}], cluster state version [{}]v access$3700xh
y primary shard is not active{
nodeExists (Ljava/lang/String;)Z}~
? access$4000? c
? ?primary shard [{}] is assigned to an unknown node [{}], scheduling a retry: action [{}], request [{}], cluster state version [{}]? access$3900?h
? -primary shard isn't assigned to a known node.? resolveIndex?
? access$4100 ?(Lcom/groupbyinc/flux/action/support/replication/TransportReplicationAction;)Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;??
? @com/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver? concreteSingleIndex x(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/IndicesRequest;)Lcom/groupbyinc/flux/index/Index;??
?? com/groupbyinc/flux/index/Index? getName? J
?? ? J
S? getRoutingTable 4()Lcom/groupbyinc/flux/cluster/routing/RoutingTable;??
?? 0com/groupbyinc/flux/cluster/routing/RoutingTable? shardRoutingTable g(Lcom/groupbyinc/flux/index/shard/ShardId;)Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable;??
?? :com/groupbyinc/flux/cluster/routing/IndexShardRoutingTable? primaryShard 4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting;??
??
indexShard