Skip to content

Commit a7f2e2d

Browse files
authored
Fix testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleShards (#104709)
Remove +1L that allows the third-smallest shard to be also allocated on the node in case it is only 1b bigger than second-smallest
1 parent e0ddb82 commit a7f2e2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleShard
196196

197197
// reduce disk size of node 0 so that only 1 of 2 smallest shards can be allocated
198198
var usableSpace = shardSizes.sizes().get(1).size();
199-
getTestFileStore(dataNodeName).setTotalSpace(usableSpace + WATERMARK_BYTES + 1L);
199+
getTestFileStore(dataNodeName).setTotalSpace(usableSpace + WATERMARK_BYTES);
200200
refreshDiskUsage();
201201

202202
final RestoreSnapshotResponse restoreSnapshotResponse = clusterAdmin().prepareRestoreSnapshot("repo", "snap")

0 commit comments

Comments
 (0)