[
https://issues.apache.org/jira/browse/CASSANDRA-10136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14719967#comment-14719967
]
Sylvain Lebresne commented on CASSANDRA-10136:
----------------------------------------------
So there were a few problems with reading old format sstables when those had
wide (indexed) rows. The first very simple one is that I simply forgot to
implement the code necessary to deserialize index entries on those old sstable,
which is what triggers the {{UnsupportedOperationException}}. So I've pushed [a
branch|https://github.com/pcmanus/cassandra/commits/10136] whose first commit
adds this implementation.
That fixed, there was a bug when rows in old format sstable were spanning
multiple index block, as we were rewinding to the beginning of a block when we
shouldn't have, and the 2nd commit in the branch fixes that (this isn't a
problem for newly created sstables since a row can't span multiple index
block). There is then 2 further commit that fixes the reverse case. The first
of those 2 commit is a simple typo fix where the reversed flag wasn't properly
passed. The 2nd one (and last commit on the branch) fix the same problem of a
row spanning multiple block but in the reversed case.
Regarding testing, I actually haven't been able to run the upgrade test locally
(I've hit a few issues and stopped trying, but it's basically hard to run those
upgrade test on a local branch from what I can tell). What I did use is upgrade
tests that I wrote for myself when working on the CASSANDRA-8099. Those tests
are
[here|https://github.com/pcmanus/cassandra-dtest/commits/8099_upgrade_tests]
and cover all the failure cases that the branch fixes. I have not committed
those to dtests because the upgrading part is rudimentary and uses hard-coded
paths for now. I think it would be beneficial to extract some flexible common
class for upgrade dtests which could be used for both the existing upgrade
tests, those 8099 tests I wrote and Tyler's tests from CASSANDRA-9704. But in
the meantime, if someone that know how to run the upgrade tests could validate
that the branch does fix it, that would be great.
The branch is ready for review in any case. CI results looks ok for both
[utest|http://cassci.datastax.com/job/pcmanus-10136-testall/4/#showFailuresLink]
and
[dtests|http://cassci.datastax.com/job/pcmanus-10136-dtest/4/#showFailuresLink].
> startup error after upgrade to 3.0
> ----------------------------------
>
> Key: CASSANDRA-10136
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10136
> Project: Cassandra
> Issue Type: Sub-task
> Reporter: Russ Hatch
> Assignee: Sylvain Lebresne
> Fix For: 3.0 beta 2
>
>
> Encountering this error after a node is upgraded to 3.0 HEAD.
> This is a rolling upgrade test, where a second node (of three) has been
> upgraded to 3.0.
> {noformat}
> ERROR [main] 2015-08-19 17:30:16,153 CassandraDaemon.java:635 - Exception
> encountered during startup
> java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> java.lang.UnsupportedOperationException
> at
> org.apache.cassandra.hints.LegacyHintsMigrator.forceCompaction(LegacyHintsMigrator.java:119)
> ~[main/:na]
> at
> org.apache.cassandra.hints.LegacyHintsMigrator.compactLegacyHints(LegacyHintsMigrator.java:108)
> ~[main/:na]
> at
> org.apache.cassandra.hints.LegacyHintsMigrator.migrate(LegacyHintsMigrator.java:92)
> ~[main/:na]
> at
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:281)
> [main/:na]
> at
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:516)
> [main/:na]
> at
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:622)
> [main/:na]
> Caused by: java.util.concurrent.ExecutionException:
> java.lang.UnsupportedOperationException
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> ~[na:1.8.0_45]
> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
> ~[na:1.8.0_45]
> at
> org.apache.cassandra.hints.LegacyHintsMigrator.forceCompaction(LegacyHintsMigrator.java:115)
> ~[main/:na]
> ... 5 common frames omitted
> Caused by: java.lang.UnsupportedOperationException: null
> at
> org.apache.cassandra.db.Serializers.clusteringPrefixSerializer(Serializers.java:52)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.IndexHelper$IndexInfo$Serializer.deserialize(IndexHelper.java:171)
> ~[main/:na]
> at
> org.apache.cassandra.db.RowIndexEntry$Serializer.deserialize(RowIndexEntry.java:150)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.format.big.BigTableScanner$KeyScanningIterator.computeNext(BigTableScanner.java:286)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.format.big.BigTableScanner$KeyScanningIterator.computeNext(BigTableScanner.java:260)
> ~[main/:na]
> at
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.format.big.BigTableScanner.hasNext(BigTableScanner.java:240)
> ~[main/:na]
> at
> org.apache.cassandra.utils.MergeIterator$OneToOne.computeNext(MergeIterator.java:439)
> ~[main/:na]
> at
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$5.hasNext(UnfilteredPartitionIterators.java:234)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.WrappingUnfilteredPartitionIterator.prepareNext(WrappingUnfilteredPartitionIterator.java:71)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.WrappingUnfilteredPartitionIterator.hasNext(WrappingUnfilteredPartitionIterator.java:55)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.PurgingPartitionIterator.hasNext(PurgingPartitionIterator.java:66)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionIterator.hasNext(CompactionIterator.java:212)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:179)
> ~[main/:na]
> at
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:80)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionManager$9.runMayThrow(CompactionManager.java:638)
> ~[main/:na]
> at
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> ~[main/:na]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> ~[na:1.8.0_45]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> ~[na:1.8.0_45]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> ~[na:1.8.0_45]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> ~[na:1.8.0_45]
> at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_45]
> ERROR [CompactionExecutor:1] 2015-08-19 17:30:16,153 CassandraDaemon.java:192
> - Exception in thread Thread[CompactionExecutor:1,1,main]
> java.lang.UnsupportedOperationException: null
> at
> org.apache.cassandra.db.Serializers.clusteringPrefixSerializer(Serializers.java:52)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.IndexHelper$IndexInfo$Serializer.deserialize(IndexHelper.java:171)
> ~[main/:na]
> at
> org.apache.cassandra.db.RowIndexEntry$Serializer.deserialize(RowIndexEntry.java:150)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.format.big.BigTableScanner$KeyScanningIterator.computeNext(BigTableScanner.java:286)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.format.big.BigTableScanner$KeyScanningIterator.computeNext(BigTableScanner.java:260)
> ~[main/:na]
> at
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> ~[main/:na]
> at
> org.apache.cassandra.io.sstable.format.big.BigTableScanner.hasNext(BigTableScanner.java:240)
> ~[main/:na]
> at
> org.apache.cassandra.utils.MergeIterator$OneToOne.computeNext(MergeIterator.java:439)
> ~[main/:na]
> at
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$5.hasNext(UnfilteredPartitionIterators.java:234)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.WrappingUnfilteredPartitionIterator.prepareNext(WrappingUnfilteredPartitionIterator.java:71)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.WrappingUnfilteredPartitionIterator.hasNext(WrappingUnfilteredPartitionIterator.java:55)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.PurgingPartitionIterator.hasNext(PurgingPartitionIterator.java:66)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionIterator.hasNext(CompactionIterator.java:212)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:179)
> ~[main/:na]
> at
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:80)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
> ~[main/:na]
> at
> org.apache.cassandra.db.compaction.CompactionManager$9.runMayThrow(CompactionManager.java:638)
> ~[main/:na]
> at
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> ~[main/:na]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> ~[na:1.8.0_45]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> ~[na:1.8.0_45]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> ~[na:1.8.0_45]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [na:1.8.0_45]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> {noformat}
> This can be reproduced by running the upgrade dtests like so:
> {noformat}
> UPGRADE_PATH="2_2:3_0" nosetests -xvs
> upgrade_through_versions_test.py:TestUpgradeThroughVersions.rolling_upgrade_test
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)