Tyler Hobbs created CASSANDRA-9239:
--------------------------------------

             Summary: OHCProvider doesn't write ByteBuffers with non-zero 
position correctly
                 Key: CASSANDRA-9239
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9239
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Tyler Hobbs
            Assignee: Tyler Hobbs
            Priority: Minor
             Fix For: 3.0
         Attachments: use-buffer-position.txt

In {{OHCProvider.DataOutputPlusAdapter.write()}}, we do the following:

{noformat}
if (buffer.hasArray())
    out.write(buffer.array(), buffer.arrayOffset(), buffer.remaining());
{noformat}

This doesn't behave correctly if the ByteBuffer has a non-zero position.  
Instead, we need to add {{buffer.position()}} to {{buffer.arrayOffset()}}.

At least against CASSANDRA-8099, this has the effect of writing incorrect row 
cache entries.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to