You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by db...@apache.org on 2014/05/06 05:46:48 UTC
[1/3] git commit: reduce garbage in BatchlogManager.replayMutations
Repository: cassandra
Updated Branches:
refs/heads/trunk 5c66dc819 -> 011f90e99
reduce garbage in BatchlogManager.replayMutations
patch by dbrosius reviewed by jbellis for cassandra-7169
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4791d981
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4791d981
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4791d981
Branch: refs/heads/trunk
Commit: 4791d9814d97c6bc373b5b126774e4d1381732a6
Parents: f524570
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Mon May 5 23:36:20 2014 -0400
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Mon May 5 23:37:20 2014 -0400
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/BatchlogManager.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4791d981/src/java/org/apache/cassandra/db/BatchlogManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/BatchlogManager.java b/src/java/org/apache/cassandra/db/BatchlogManager.java
index 5aea736..b92c217 100644
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@ -278,11 +278,11 @@ public class BatchlogManager implements BatchlogManagerMBean
if (ttl <= 0)
return; // this batchlog entry has 'expired'
+ List<InetAddress> liveEndpoints = new ArrayList<>();
+ List<InetAddress> hintEndpoints = new ArrayList<>();
+
for (RowMutation mutation : mutations)
{
- List<InetAddress> liveEndpoints = new ArrayList<>();
- List<InetAddress> hintEndpoints = new ArrayList<>();
-
String ks = mutation.getKeyspaceName();
Token tk = StorageService.getPartitioner().getToken(mutation.key());
int mutationSize = (int) RowMutation.serializer.serializedSize(mutation, version);
@@ -304,6 +304,9 @@ public class BatchlogManager implements BatchlogManagerMBean
for (InetAddress endpoint : hintEndpoints)
StorageProxy.writeHintForMutation(mutation, writtenAt, ttl, endpoint);
+
+ liveEndpoints.clear();
+ hintEndpoints.clear();
}
}
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Posted by db...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ac63e180
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ac63e180
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ac63e180
Branch: refs/heads/trunk
Commit: ac63e180a50071bed398c82713452ccfe5c4237d
Parents: f0575f1 4791d98
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Mon May 5 23:45:53 2014 -0400
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Mon May 5 23:45:53 2014 -0400
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/BatchlogManager.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac63e180/src/java/org/apache/cassandra/db/BatchlogManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/BatchlogManager.java
index de51c8d,b92c217..3ffc7a7
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@@ -271,14 -278,14 +271,14 @@@ public class BatchlogManager implement
if (ttl <= 0)
return; // this batchlog entry has 'expired'
+ List<InetAddress> liveEndpoints = new ArrayList<>();
+ List<InetAddress> hintEndpoints = new ArrayList<>();
+
- for (RowMutation mutation : mutations)
+ for (Mutation mutation : mutations)
{
- List<InetAddress> liveEndpoints = new ArrayList<>();
- List<InetAddress> hintEndpoints = new ArrayList<>();
-
String ks = mutation.getKeyspaceName();
Token tk = StorageService.getPartitioner().getToken(mutation.key());
- int mutationSize = (int) RowMutation.serializer.serializedSize(mutation, version);
+ int mutationSize = (int) Mutation.serializer.serializedSize(mutation, version);
for (InetAddress endpoint : Iterables.concat(StorageService.instance.getNaturalEndpoints(ks, tk),
StorageService.instance.getTokenMetadata().pendingEndpointsFor(tk, ks)))
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by db...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/011f90e9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/011f90e9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/011f90e9
Branch: refs/heads/trunk
Commit: 011f90e9921d221842c2543f9eae6c91979734ed
Parents: 5c66dc8 ac63e18
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Mon May 5 23:46:30 2014 -0400
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Mon May 5 23:46:30 2014 -0400
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/BatchlogManager.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------