diff --git a/CHANGES.txt b/CHANGES.txt index d2e48506a6..aa4ef391fc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -240,6 +240,7 @@ 3.11.3 + * Remove string formatting lines from BufferPool hot path (CASSANDRA-14416) * Detect OpenJDK jvm type and architecture (CASSANDRA-12793) * Don't use guava collections in the non-system keyspace jmx attributes (CASSANDRA-12271) * Allow existing nodes to use all peers in shadow round (CASSANDRA-13851) diff --git a/src/java/org/apache/cassandra/utils/memory/BufferPool.java b/src/java/org/apache/cassandra/utils/memory/BufferPool.java index 20e600630c..f9ec40c3d8 100644 --- a/src/java/org/apache/cassandra/utils/memory/BufferPool.java +++ b/src/java/org/apache/cassandra/utils/memory/BufferPool.java @@ -265,8 +265,7 @@ public class BufferPool if (cur + MACRO_CHUNK_SIZE > MEMORY_USAGE_THRESHOLD) { noSpamLogger.info("Maximum memory usage reached ({}), cannot allocate chunk of {}", - FBUtilities.prettyPrintMemory(MEMORY_USAGE_THRESHOLD), - FBUtilities.prettyPrintMemory(MACRO_CHUNK_SIZE)); + MEMORY_USAGE_THRESHOLD, MACRO_CHUNK_SIZE); return false; } if (memoryUsage.compareAndSet(cur, cur + MACRO_CHUNK_SIZE)) @@ -284,9 +283,7 @@ public class BufferPool noSpamLogger.error("Buffer pool failed to allocate chunk of {}, current size {} ({}). " + "Attempting to continue; buffers will be allocated in on-heap memory which can degrade performance. " + "Make sure direct memory size (-XX:MaxDirectMemorySize) is large enough to accommodate off-heap memtables and caches.", - FBUtilities.prettyPrintMemory(MACRO_CHUNK_SIZE), - FBUtilities.prettyPrintMemory(sizeInBytes()), - oom.toString()); + MACRO_CHUNK_SIZE, sizeInBytes(), oom.toString()); return false; }