diff --git a/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java b/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java index 28142360a9a..82a0fe31f08 100644 --- a/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java @@ -60,17 +60,11 @@ import static org.elasticsearch.ExceptionsHelper.detailedMessage; public abstract class TransportShardReplicationOperationAction extends TransportAction { protected final TransportService transportService; - protected final ClusterService clusterService; - protected final IndicesService indicesService; - protected final ShardStateAction shardStateAction; - protected final ReplicationType defaultReplicationType; - protected final WriteConsistencyLevel defaultWriteConsistencyLevel; - protected final TransportRequestOptions transportOptions; final String transportAction; @@ -307,15 +301,10 @@ public abstract class TransportShardReplicationOperationAction listener; - private final Request request; - - private ClusterState clusterState; - - private ShardIterator shardIt; - + private volatile ClusterState clusterState; + private volatile ShardIterator shardIt; private final AtomicBoolean primaryOperationStarted = new AtomicBoolean(); - private final ReplicationType replicationType; AsyncShardOperationAction(Request request, ActionListener listener) { @@ -371,7 +360,7 @@ public abstract class TransportShardReplicationOperationAction