Skip to content

Commit

Permalink
Merge pull request #662 from scireum/feature/es-memory-pressure-fix
Browse files Browse the repository at this point in the history
Use the correct data type for calculating the memory pressure
  • Loading branch information
jmuscireum authored Sep 19, 2024
2 parents 7755581 + b53eca1 commit 3347b98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/sirius/db/es/ElasticMetricsProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public int getCurrentMaxMemoryPressure() {

private int calculateMemoryPressure(JsonNode memoryStats) {
JsonNode oldGenStats = memoryStats.at(OLD_GEN_STATS_POINTER);
int usedInBytes = oldGenStats.path("used_in_bytes").asInt();
int maxInBytes = oldGenStats.path("max_in_bytes").asInt();
long usedInBytes = oldGenStats.path("used_in_bytes").asLong();
long maxInBytes = oldGenStats.path("max_in_bytes").asLong();

if (maxInBytes == 0) {
return 0;
Expand Down

0 comments on commit 3347b98

Please sign in to comment.