Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 443088fd1 -> 28058608f
  refs/heads/trunk 4f1094e66 -> dd650c8e8


Remove string formatting lines from BufferPool hot path

Patch by Jeff Jirsa; Reviewed by Marcus Eriksson for CASSANDRA-14416


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/28058608
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/28058608
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/28058608

Branch: refs/heads/cassandra-3.11
Commit: 28058608f13d2a5bbc0da2af344b92d3acad7e26
Parents: 443088f
Author: Jeff Jirsa <jji...@apple.com>
Authored: Tue Apr 24 23:15:13 2018 -0700
Committer: Jeff Jirsa <jji...@apple.com>
Committed: Sat May 12 21:08:15 2018 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                | 1 +
 src/java/org/apache/cassandra/utils/memory/BufferPool.java | 7 ++-----
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/28058608/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3e8f687..e63e5f3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.11.3
+ * Remove string formatting lines from BufferPool hot path (CASSANDRA-14416)
  * Update metrics to 3.1.5 (CASSANDRA-12924)
  * Detect OpenJDK jvm type and architecture (CASSANDRA-12793)
  * Don't use guava collections in the non-system keyspace jmx attributes 
(CASSANDRA-12271)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/28058608/src/java/org/apache/cassandra/utils/memory/BufferPool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/memory/BufferPool.java 
b/src/java/org/apache/cassandra/utils/memory/BufferPool.java
index 20e6006..f9ec40c 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;
             }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to