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

Expired rows without regular column data can crash upgradesstables

    XMLWordPrintableJSON

Details

    • Normal

    Description

      In 2.x if an expired row is compacted its row marker will be converted into a DeletedCell. In 3.0, when the row is read by LegacyLayout it will be converted in a row without PrimaryKeyLivenessInfo. If the row does not contains any data for the regular columns, or if the table simply has no regular columns it will then be considered as empty. Which will crash upgradesstables with the following error:

      java.lang.AssertionError
              at org.apache.cassandra.db.rows.Rows.collectStats(Rows.java:70)
              at org.apache.cassandra.io.sstable.format.big.BigTableWriter$StatsCollector.applyToRow(BigTableWriter.java:207)
              at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:116)
              at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:107)
              at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:41)
              at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:156)
              at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:122)
              at org.apache.cassandra.io.sstable.format.big.BigTableWriter.append(BigTableWriter.java:147)
              at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:125)
              at org.apache.cassandra.db.compaction.writers.DefaultCompactionWriter.realAppend(DefaultCompactionWriter.java:57)
              at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.append(CompactionAwareWriter.java:109)
              at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:195)
              at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
              at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:89)
              at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:61)
              at org.apache.cassandra.db.compaction.CompactionManager$5.execute(CompactionManager.java:416)
              at org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:308)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$0(NamedThreadFactory.java:79)
              at java.lang.Thread.run(Thread.java:745)
      

      This problem is cause

      Attachments

        Activity

          People

            blerer Benjamin Lerer
            blerer Benjamin Lerer
            Benjamin Lerer
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: