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 2015/01/10 01:59:58 UTC

[4/6] cassandra git commit: fix hints serialized size calculation patch by dbrosius reviewed by thobbs for cassandra-8587

fix hints serialized size calculation
patch by dbrosius reviewed by thobbs for cassandra-8587


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

Branch: refs/heads/trunk
Commit: e4fc395242ee81a85141eda616ba97e937d1c604
Parents: df1f5ea
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Fri Jan 9 19:50:54 2015 -0500
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Fri Jan 9 19:50:54 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                       | 1 +
 src/java/org/apache/cassandra/net/MessageOut.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4fc3952/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0c7e9a2..fc43dfa 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -59,6 +59,7 @@
  * Add DC-aware sequential repair (CASSANDRA-8193)
  * Improve JBOD disk utilization (CASSANDRA-7386)
  * Use live sstables in snapshot repair if possible (CASSANDRA-8312)
+ * Fix hints serialized size calculation (CASSANDRA-8587)
 
 
 2.0.11:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4fc3952/src/java/org/apache/cassandra/net/MessageOut.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/MessageOut.java b/src/java/org/apache/cassandra/net/MessageOut.java
index dd6cae8..f49e3f7 100644
--- a/src/java/org/apache/cassandra/net/MessageOut.java
+++ b/src/java/org/apache/cassandra/net/MessageOut.java
@@ -128,8 +128,8 @@ public class MessageOut<T>
         size += TypeSizes.NATIVE.sizeof(parameters.size());
         for (Map.Entry<String, byte[]> entry : parameters.entrySet())
         {
-            TypeSizes.NATIVE.sizeof(entry.getKey());
-            TypeSizes.NATIVE.sizeof(entry.getValue().length);
+            size += TypeSizes.NATIVE.sizeof(entry.getKey());
+            size += TypeSizes.NATIVE.sizeof(entry.getValue().length);
             size += entry.getValue().length;
         }