|
31 | 31 | import org.elasticsearch.cluster.metadata.IndexMetaData;
|
32 | 32 | import org.elasticsearch.cluster.node.DiscoveryNode;
|
33 | 33 | import org.elasticsearch.cluster.node.DiscoveryNodes;
|
34 |
| -import org.elasticsearch.cluster.routing.RecoverySource.SnapshotRecoverySource; |
35 | 34 | import org.elasticsearch.cluster.routing.RecoverySource.Type;
|
36 | 35 | import org.elasticsearch.cluster.routing.RoutingNode;
|
37 | 36 | import org.elasticsearch.cluster.routing.RoutingTable;
|
|
40 | 39 | import org.elasticsearch.common.Nullable;
|
41 | 40 | import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
42 | 41 | import org.elasticsearch.common.inject.Inject;
|
43 |
| -import org.elasticsearch.common.lucene.Lucene; |
44 | 42 | import org.elasticsearch.common.settings.Settings;
|
45 | 43 | import org.elasticsearch.common.unit.TimeValue;
|
46 | 44 | import org.elasticsearch.common.util.Callback;
|
|
52 | 50 | import org.elasticsearch.index.IndexComponent;
|
53 | 51 | import org.elasticsearch.index.IndexService;
|
54 | 52 | import org.elasticsearch.index.IndexSettings;
|
55 |
| -import org.elasticsearch.index.IndexShardAlreadyExistsException; |
56 | 53 | import org.elasticsearch.index.shard.IndexEventListener;
|
57 | 54 | import org.elasticsearch.index.shard.IndexShard;
|
58 | 55 | import org.elasticsearch.index.shard.IndexShardRelocatedException;
|
@@ -532,10 +529,6 @@ private void createShard(DiscoveryNodes nodes, RoutingTable routingTable, ShardR
|
532 | 529 | RecoveryState recoveryState = new RecoveryState(shardRouting, nodes.getLocalNode(), sourceNode);
|
533 | 530 | indicesService.createShard(shardRouting, recoveryState, recoveryTargetService, new RecoveryListener(shardRouting),
|
534 | 531 | repositoriesService, failedShardHandler);
|
535 |
| - } catch (IndexShardAlreadyExistsException e) { |
536 |
| - // ignore this, the method call can happen several times |
537 |
| - logger.debug("Trying to create shard that already exists", e); |
538 |
| - assert false; |
539 | 532 | } catch (Exception e) {
|
540 | 533 | failAndRemoveShard(shardRouting, true, "failed to create shard", e);
|
541 | 534 | }
|
|
0 commit comments