|
12 | 12 | import org.opensearch.OpenSearchException;
|
13 | 13 | import org.opensearch.action.StepListener;
|
14 | 14 | import org.opensearch.cluster.node.DiscoveryNode;
|
15 |
| -import org.opensearch.cluster.routing.IndexShardRoutingTable; |
16 |
| -import org.opensearch.cluster.routing.ShardRouting; |
17 | 15 | import org.opensearch.common.logging.Loggers;
|
18 | 16 | import org.opensearch.common.util.CancellableThreads;
|
19 | 17 | import org.opensearch.common.util.concurrent.ListenableFuture;
|
|
22 | 20 | import org.opensearch.core.action.ActionListener;
|
23 | 21 | import org.opensearch.index.shard.IndexShard;
|
24 | 22 | import org.opensearch.index.store.StoreFileMetadata;
|
25 |
| -import org.opensearch.indices.recovery.DelayRecoveryException; |
26 | 23 | import org.opensearch.indices.recovery.FileChunkWriter;
|
27 | 24 | import org.opensearch.indices.recovery.MultiChunkTransfer;
|
28 | 25 | import org.opensearch.indices.replication.common.CopyState;
|
@@ -146,12 +143,6 @@ public synchronized void sendFiles(GetSegmentFilesRequest request, ActionListene
|
146 | 143 | );
|
147 | 144 | };
|
148 | 145 | cancellableThreads.checkForCancel();
|
149 |
| - final IndexShardRoutingTable routingTable = shard.getReplicationGroup().getRoutingTable(); |
150 |
| - ShardRouting targetShardRouting = routingTable.getByAllocationId(request.getTargetAllocationId()); |
151 |
| - if (targetShardRouting == null) { |
152 |
| - logger.debug("delaying replication of {} as it is not listed as assigned to target node {}", shard.shardId(), targetNode); |
153 |
| - throw new DelayRecoveryException("source node does not have the shard listed in its state as allocated on the node"); |
154 |
| - } |
155 | 146 |
|
156 | 147 | final StepListener<Void> sendFileStep = new StepListener<>();
|
157 | 148 | Set<String> storeFiles = new HashSet<>(Arrays.asList(shard.store().directory().listAll()));
|
|
0 commit comments