You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2017/03/31 13:56:41 UTC

[jira] [Commented] (CASSANDRA-13395) Expired rows without regular column data can crash upgradesstables

    [ https://issues.apache.org/jira/browse/CASSANDRA-13395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950928#comment-15950928 ] 

Benjamin Lerer commented on CASSANDRA-13395:
--------------------------------------------

I discussed offline with [~slebresne] and the internal iterators do not accept empty rows for performance reasons.
As we know that except for indexes the deleted cells are caused by the compaction of expired row marker we can avoid the empty row problem by treating those rows as the expired ones. The only information missing being the original TTL we can simply replace that one by a fake one.

I pushed an initial version of the patch [here|https://github.com/apache/cassandra/compare/trunk...blerer:13395-3.0].  

> Expired rows without regular column data can crash upgradesstables
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-13395
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13395
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>
> 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:
> {code}
> 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)
> {code}
> This problem is cause



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)