Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2581

Rebuffer called excessively during seeks

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.7.6, 0.8.0
    • None
    • None
    • Low

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lenn0x Chris Goffinet Assign to me
            lenn0x Chris Goffinet
            Chris Goffinet
            Pavel Yaskevich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment