Skip to content

Commit 3347b98

Browse files
authored
Merge pull request #662 from scireum/feature/es-memory-pressure-fix
Use the correct data type for calculating the memory pressure
2 parents 7755581 + b53eca1 commit 3347b98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/sirius/db/es/ElasticMetricsProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public int getCurrentMaxMemoryPressure() {
8181

8282
private int calculateMemoryPressure(JsonNode memoryStats) {
8383
JsonNode oldGenStats = memoryStats.at(OLD_GEN_STATS_POINTER);
84-
int usedInBytes = oldGenStats.path("used_in_bytes").asInt();
85-
int maxInBytes = oldGenStats.path("max_in_bytes").asInt();
84+
long usedInBytes = oldGenStats.path("used_in_bytes").asLong();
85+
long maxInBytes = oldGenStats.path("max_in_bytes").asLong();
8686

8787
if (maxInBytes == 0) {
8888
return 0;

0 commit comments

Comments
 (0)