Skip to content

Commit ab8f435

Browse files
authored
Additional logging for testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleShards (#106255)
1 parent 7cd0902 commit ab8f435

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ public void testRestoreSnapshotAllocationDoesNotExceedWatermark() throws Excepti
164164
@TestIssueLogging(
165165
value = "org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceComputer:TRACE,"
166166
+ "org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceReconciler:DEBUG,"
167-
+ "org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceShardsAllocator:TRACE",
167+
+ "org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceShardsAllocator:TRACE,"
168+
+ "org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator:TRACE,"
169+
+ "org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders:TRACE,"
170+
+ "org.elasticsearch.cluster.routing.allocation.decider.DiskThresholdDecider:TRACE",
168171
issueUrl = "https://github.com/elastic/elasticsearch/issues/105331"
169172
)
170173
public void testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleShards() throws Exception {
@@ -291,10 +294,6 @@ public Set<ShardId> getShardIdsWithSizeSmallerOrEqual(long size) {
291294
public Set<ShardId> getSmallestShardIds() {
292295
return getShardIdsWithSizeSmallerOrEqual(getSmallestShardSize());
293296
}
294-
295-
public Set<ShardId> getAllShardIds() {
296-
return sizes.stream().map(ShardSize::shardId).collect(toSet());
297-
}
298297
}
299298

300299
private record ShardSize(ShardId shardId, long size) {}

server/src/test/java/org/elasticsearch/cluster/routing/allocation/allocator/DesiredBalanceComputerTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,10 +1300,6 @@ public ShardAllocationDecision decideShardAllocation(ShardRouting shard, Routing
13001300
}, DesiredBalanceComputer.class, expectation);
13011301
}
13021302

1303-
private static Map.Entry<String, Long> indexSize(ClusterState clusterState, String name, long size, boolean primary) {
1304-
return Map.entry(shardIdentifierFromRouting(findShardId(clusterState, name), primary), size);
1305-
}
1306-
13071303
private static ShardId findShardId(ClusterState clusterState, String name) {
13081304
return clusterState.getRoutingTable().index(name).shard(0).shardId();
13091305
}

0 commit comments

Comments
 (0)