Skip to content

Commit b22e693

Browse files
remove unused
1 parent 2c4a71a commit b22e693

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

server/src/main/java/org/elasticsearch/action/search/AbstractSearchAsyncAction.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.elasticsearch.cluster.ClusterState;
2525
import org.elasticsearch.common.bytes.BytesReference;
2626
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
27-
import org.elasticsearch.common.util.Countable;
2827
import org.elasticsearch.common.util.Maps;
2928
import org.elasticsearch.common.util.concurrent.AtomicArray;
3029
import org.elasticsearch.core.Releasable;
@@ -165,18 +164,6 @@ abstract class AbstractSearchAsyncAction<Result extends SearchPhaseResult> exten
165164
this.clusters = clusters;
166165
}
167166

168-
// we need to add 1 for non-active partition, since we count it in the total. This means for each shard in the iterator we sum up
169-
// it's number of active shards but use 1 as the default if no replica of a shard is active at this point.
170-
// on a per shards level we use shardIt.remaining() to increment the totalOps pointer but add 1 for the current shard result
171-
// we process hence we add one for the non-active partition here.
172-
private static int totalSizeWith1ForEmpty(List<? extends Countable> iterators) {
173-
int size = 0;
174-
for (Countable shard : iterators) {
175-
size += Math.max(1, shard.size());
176-
}
177-
return size;
178-
}
179-
180167
protected void notifyListShards(
181168
SearchProgressListener progressListener,
182169
SearchResponse.Clusters clusters,

0 commit comments

Comments
 (0)