Skip to content

Commit dd73d37

Browse files
committed
Additional assertions
1 parent 0cacdc7 commit dd73d37

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/cluster/ShardHeapUsage.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public record ShardHeapUsage(String nodeId, String nodeName, long totalBytes, lo
2222

2323
public ShardHeapUsage {
2424
assert estimatedUsageBytes <= totalBytes;
25+
assert totalBytes >= 0;
26+
assert estimatedUsageBytes >= 0;
2527
}
2628

2729
public ShardHeapUsage(StreamInput in) throws IOException {

0 commit comments

Comments
 (0)