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

Stefania commented on CASSANDRA-9288:
-------------------------------------

Patch for trunk is available here: 
https://github.com/stef1927/cassandra/commits/9288

Aside from the class cast exception introduced by WrappingCompactionStrategy, 
there was something fundamentally wrong in testParallelLeveledCompaction() in 
that CASSANDRA-7272 changed LCS.getMaximalTask() to become a major compaction 
task, so it did not make much sense to test this in parallel.

Prior to CASSANDRA-7272, LCS.getMaximalTask() was returning the first 
background task, same as getNextBackgroundTask(). Comparing the source code 
indicates that getNextBackgroundTask() is the old getMaximalTask(). So I 
changed the test to call getNextBackgroundTask() instead of getMaximalTask().

I also picked the unrepaired compaction strategy since the repaired one did not 
return any tasks.

Finally this code did not make much sense to me:

{code}
        for (SSTableReader sstable : store.getSSTables())
        {
            assert sstable.getSSTableLevel() == sstable.getSSTableLevel();
        }
{code}

So I removed it in favor of an assertion against the level an sstable is 
reported to belong to, in the for loop just above.

[~krummas] I think you would be the best person to review this and to determine 
if this test is sufficient or it can be improved further (e.g. repaired vs 
unrepaired)?

> LongLeveledCompactionStrategyTest is failing
> --------------------------------------------
>
>                 Key: CASSANDRA-9288
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9288
>             Project: Cassandra
>          Issue Type: Test
>            Reporter: Ariel Weisberg
>            Assignee: Stefania
>             Fix For: 3.x
>
>
> Pretty straightforward bad cast followed by some code rot where things return 
> null that didn't used to.
> I suspect this has been broken since WrappingCompactionStrategy was 
> introduced. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to