cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: reduce Map allocations in hinted handoff delivery patch by dbrosius reviewed by jbellis for cassandra-5919
Date Thu, 22 Aug 2013 03:34:20 GMT
Updated Branches:
  refs/heads/cassandra-2.0 1af59e39e -> 647e0678d


reduce Map allocations in hinted handoff delivery
patch by dbrosius reviewed by jbellis for cassandra-5919


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

Branch: refs/heads/cassandra-2.0
Commit: 647e0678db7c4a112a605754459e3d67973275c3
Parents: 1af59e3
Author: Dave Brosius <dbrosius@apache.org>
Authored: Wed Aug 21 23:32:37 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Wed Aug 21 23:32:37 2013 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/HintedHandOffManager.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/647e0678/src/java/org/apache/cassandra/db/HintedHandOffManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
index 014a4cc..406f62d 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -356,7 +356,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
             }
 
             List<WriteResponseHandler> responseHandlers = Lists.newArrayList();
-
+            Map<UUID, Long> truncationTimesCache = new HashMap<UUID, Long>();
             for (final Column hint : hintsPage)
             {
                 // check if hints delivery has been paused during the process
@@ -395,7 +395,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
                     throw new AssertionError(e);
                 }
 
-                Map<UUID, Long> truncationTimesCache = new HashMap<UUID, Long>();
+                truncationTimesCache.clear();
                 for (UUID cfId : ImmutableSet.copyOf((rm.getColumnFamilyIds())))
                 {
                     Long truncatedAt = truncationTimesCache.get(cfId);


Mime
View raw message