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

CompressedSequentialWriter can write zero-length segments during scrub

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: