cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2581) Rebuffer called excessively during seeks
Date Fri, 29 Apr 2011 15:54:03 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis updated CASSANDRA-2581:
--------------------------------------

             Reviewer: xedin
    Affects Version/s:     (was: 0.8.1)
                       0.7.3
        Fix Version/s: 0.8.1
                       0.7.6

bq. we shouldn't need to rebuffer if newPosition is equal to bufferOffset + validBufferBytes

I think that is correct, patch attached. I will ask Pavel to also review since this is extremely
important not to break.

bq. second the evaluation was doing (newPosition >= bufferOffset) + validBufferBytes

No, addition is higher precedence than comparison (or the logical operations). In fact if
you force the grouping you suggest, javac will reject it since you cannot add a boolean and
an int.

> Rebuffer called excessively during seeks
> ----------------------------------------
>
>                 Key: CASSANDRA-2581
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2581
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.3
>            Reporter: Chris Goffinet
>            Assignee: Chris Goffinet
>            Priority: Minor
>             Fix For: 0.7.6, 0.8.1
>
>         Attachments: 0001-Rebuffer-called-excessively-during-seeks.patch, 2581.txt
>
>
> When doing an strace tonight, I noticed during memtable flushes that we were only writing
1KB per every write() system call...After diving more into it, it's because of a bug in the
seek() code. 
> if (newPosition >= bufferOffset + validBufferBytes || newPosition < bufferOffset)
> vs.
> if (newPosition > (bufferOffset + validBufferBytes) || newPosition < bufferOffset)
> Two things I noticed, we shouldn't need to rebuffer if newPosition is equal to bufferOffset
+ validBufferBytes, second the evaluation was doing (newPosition >= bufferOffset) + validBufferBytes
which always seemed to be true.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message