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

CompressedSequentialWriter can write zero-length segments during scrub

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
    • 1.2.16, 2.0.6, 2.1 beta2
    • None
    • None
    • Low

    Description

      This results in errors like this:

      java.lang.IllegalArgumentException
      	at java.nio.Buffer.limit(Buffer.java:267)
      	at org.apache.cassandra.io.compress.CompressedRandomAccessReader.decompressChunk(CompressedRandomAccessReader.java:108)
      	at org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer(CompressedRandomAccessReader.java:87)
      	at org.apache.cassandra.io.util.RandomAccessReader.seek(RandomAccessReader.java:280)
      

      (Because a zero-length chunk actually turns into a length of -4 in the compressed.limit(chunk.length) call, since no checksum is written either.)

      I thought this would be from two bad rows in a row, but it's not; the source file that resulted in scrub creating this, did not have any of those. (But it does have several instances of bad-good-bad, i.e. separated by exactly one row, that is not large enough to force a new compressed chunk.)

      Attachments

        Activity

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

          People

            kvaster Viktor Kuzmin Assign to me
            jbellis Jonathan Ellis
            Viktor Kuzmin
            Marcus Eriksson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment