|
33 | 33 | package org.opensearch.gateway;
|
34 | 34 |
|
35 | 35 | import org.apache.logging.log4j.Logger;
|
36 |
| -import org.apache.logging.log4j.message.ParameterizedMessage; |
37 | 36 | import org.opensearch.cluster.node.DiscoveryNode;
|
38 |
| -import org.opensearch.cluster.routing.RecoverySource; |
39 | 37 | import org.opensearch.cluster.routing.RoutingNode;
|
40 | 38 | import org.opensearch.cluster.routing.RoutingNodes;
|
41 | 39 | import org.opensearch.cluster.routing.ShardRouting;
|
42 |
| -import org.opensearch.cluster.routing.UnassignedInfo; |
43 | 40 | import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus;
|
44 | 41 | import org.opensearch.cluster.routing.allocation.AllocateUnassignedDecision;
|
45 | 42 | import org.opensearch.cluster.routing.allocation.NodeAllocationResult;
|
46 | 43 | import org.opensearch.cluster.routing.allocation.RoutingAllocation;
|
47 |
| -import org.opensearch.env.ShardLockObtainFailedException; |
48 | 44 | import org.opensearch.gateway.AsyncShardFetch.FetchResult;
|
49 | 45 | import org.opensearch.gateway.TransportNodesListGatewayStartedShardsBatch.NodeGatewayStartedShardsBatch;
|
50 | 46 | import org.opensearch.gateway.TransportNodesListGatewayStartedShardsBatch.NodeGatewayStartedShards;
|
51 |
| -import org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint; |
52 | 47 |
|
53 |
| -import java.util.ArrayList; |
54 |
| -import java.util.Collection; |
55 | 48 | import java.util.Collections;
|
56 | 49 | import java.util.Comparator;
|
57 | 50 | import java.util.HashMap;
|
58 | 51 | import java.util.HashSet;
|
59 |
| -import java.util.Iterator; |
60 | 52 | import java.util.List;
|
61 | 53 | import java.util.Map;
|
62 | 54 | import java.util.Set;
|
63 |
| -import java.util.TreeMap; |
64 |
| -import java.util.stream.Collectors; |
65 |
| -import java.util.stream.Stream; |
66 | 55 |
|
67 | 56 | /**
|
68 | 57 | * PrimaryShardBatchAllocator is similar to {@link org.opensearch.gateway.PrimaryShardAllocator} only difference is
|
@@ -130,7 +119,7 @@ public HashMap<ShardRouting, AllocateUnassignedDecision> makeAllocationDecision(
|
130 | 119 | if (matchingShard == null) {
|
131 | 120 | matchingShard = shard;
|
132 | 121 | }
|
133 |
| - AllocateUnassignedDecision decision = skipSnapshotRestore(matchingShard, allocation); |
| 122 | + AllocateUnassignedDecision decision = getInEligibleShardDecision(matchingShard, allocation); |
134 | 123 | if (decision != null) {
|
135 | 124 | shardsNotEligibleForFetch.add(shard);
|
136 | 125 | shardAllocationDecisions.put(shard, decision);
|
|
0 commit comments