cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasobr...@apache.org
Subject cassandra git commit: revert CBUtil.writeValue as pre discussion on CASSANDRA-13789
Date Fri, 29 Sep 2017 13:05:05 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 55772088e -> e296ff063


revert CBUtil.writeValue as pre discussion on CASSANDRA-13789


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

Branch: refs/heads/trunk
Commit: e296ff0632a41d5bbd29b407a83d886c10787f51
Parents: 5577208
Author: Jason Brown <jasedbrown@gmail.com>
Authored: Fri Sep 29 06:04:41 2017 -0700
Committer: Jason Brown <jasedbrown@gmail.com>
Committed: Fri Sep 29 06:04:41 2017 -0700

----------------------------------------------------------------------
 CHANGES.txt                                         | 2 +-
 src/java/org/apache/cassandra/transport/CBUtil.java | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e296ff06/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6e91a48..ea73fcd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
 4.0
- * Update lz4 to 1.4.0 (13741)
+ * Update lz4 to 1.4.0 (CASSANDRA-13741)
  * Optimize Paxos prepare and propose stage for local requests (CASSANDRA-13862)
  * Throttle base partitions during MV repair streaming to prevent OOM (CASSANDRA-13299)
  * Use compaction threshold for STCS in L0 (CASSANDRA-13861)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e296ff06/src/java/org/apache/cassandra/transport/CBUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/transport/CBUtil.java b/src/java/org/apache/cassandra/transport/CBUtil.java
index 52217a9..80b80b4 100644
--- a/src/java/org/apache/cassandra/transport/CBUtil.java
+++ b/src/java/org/apache/cassandra/transport/CBUtil.java
@@ -444,12 +444,7 @@ public abstract class CBUtil
         cb.writeInt(remaining);
 
         if (remaining > 0)
-        {
-            // write and reset original position so we not need to create a duplicate.
-            int position = bytes.position();
-            cb.writeBytes(bytes);
-            bytes.position(position);
-        }
+            cb.writeBytes(bytes.duplicate());
     }
 
     public static int sizeOfValue(byte[] bytes)


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


Mime
View raw message