cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/3] cassandra git commit: Fix HSHA/offheap_objects corruption
Date Thu, 12 Feb 2015 21:08:17 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 97acfb091 -> f34f712ad


Fix HSHA/offheap_objects corruption

patch by benedict; reviewed by marcus for CASSANDRA-8719


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

Branch: refs/heads/trunk
Commit: 7cc1cf000c6b48bc13aa551467f27e4ab28b2031
Parents: fd6f9c6
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Wed Feb 11 11:21:12 2015 +0000
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Feb 11 15:19:22 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                | 1 +
 src/java/org/apache/cassandra/utils/memory/MemoryUtil.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cc1cf00/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d44d70d..954fa3f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Fix HSHA/offheap_objects corruption (CASSANDRA-8719)
  * Upgrade libthrift to 0.9.2 (CASSANDRA-8685)
  * Don't use the shared ref in sstableloader (CASSANDRA-8704)
  * Purge internal prepared statements if related tables or

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cc1cf00/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java b/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
index 129a60b..57edc52 100644
--- a/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
+++ b/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
@@ -243,7 +243,7 @@ public abstract class MemoryUtil
         if (buffer.isDirect())
             setBytes(unsafe.getLong(buffer, DIRECT_BYTE_BUFFER_ADDRESS_OFFSET) + start, address,
count);
         else
-            setBytes(address, buffer.array(), start, count);
+            setBytes(address, buffer.array(), buffer.arrayOffset() + start, count);
     }
 
     /**


Mime
View raw message