cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject cassandra git commit: OHCProvider doesn't write ByteBuffers with non-zero position correctly
Date Sat, 25 Apr 2015 08:14:26 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk d9fcb3974 -> d06dbbbf7


OHCProvider doesn't write ByteBuffers with non-zero position correctly

patch by Tyler Hobbs; reviewed by Robert Stupp for CASSANDRA-9239


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

Branch: refs/heads/trunk
Commit: d06dbbbf7b733bd3141acca29a452b2da2f3502d
Parents: d9fcb39
Author: Tyler Hobbs <tyler@datastax.com>
Authored: Sat Apr 25 10:11:24 2015 +0200
Committer: Robert Stupp <snazy@snazy.de>
Committed: Sat Apr 25 10:11:24 2015 +0200

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cache/OHCProvider.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d06dbbbf/src/java/org/apache/cassandra/cache/OHCProvider.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/OHCProvider.java b/src/java/org/apache/cassandra/cache/OHCProvider.java
index 95c323a..e4cfb69 100644
--- a/src/java/org/apache/cassandra/cache/OHCProvider.java
+++ b/src/java/org/apache/cassandra/cache/OHCProvider.java
@@ -264,7 +264,7 @@ public class OHCProvider implements CacheProvider<RowCacheKey, IRowCacheEntry>
         public void write(ByteBuffer buffer) throws IOException
         {
             if (buffer.hasArray())
-                out.write(buffer.array(), buffer.arrayOffset(), buffer.remaining());
+                out.write(buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining());
             else
                 throw new UnsupportedOperationException("IMPLEMENT ME");
         }


Mime
View raw message