cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9251) Dropping a table while compacting causes exceptions
Date Mon, 27 Apr 2015 23:19:38 GMT

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

Benedict commented on CASSANDRA-9251:
-------------------------------------

Pushed a fix [here|https://github.com/belliottsmith/cassandra/tree/9251]

This actually fixes the problem twice, just for good measure. First, it cancels any in progress
compactions when dropping, which seems useful anyway and should prevent us ever calling unmarkCompacting
during the invalid period.

Second, it removes the extra pre-unmark check, and just calls unreference..() in the event
we're invalid, since there doesn't appear to be a good reason to do it twice, and the second
check is safer than the first.

> Dropping a table while compacting causes exceptions
> ---------------------------------------------------
>
>                 Key: CASSANDRA-9251
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9251
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: T Jake Luciani
>            Assignee: Benedict
>            Priority: Minor
>             Fix For: 2.1.5
>
>         Attachments: 21test.txt
>
>
> Run the attached test:
> {code}
>  [junit] ------------- ---------------- ---------------
>     [junit] Testcase: testDropDuringCompaction(org.apache.cassandra.cql3.CrcCheckChanceTest):
Caused an ERROR
>     [junit] java.util.concurrent.ExecutionException: java.lang.AssertionError
>     [junit] java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError
>     [junit] 	at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:402)
>     [junit] 	at org.apache.cassandra.utils.FBUtilities.waitOnFutures(FBUtilities.java:391)
>     [junit] 	at org.apache.cassandra.cql3.CrcCheckChanceTest.testDropDuringCompaction(CrcCheckChanceTest.java:144)
>     [junit] Caused by: java.util.concurrent.ExecutionException: java.lang.AssertionError
>     [junit] 	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>     [junit] 	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
>     [junit] 	at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:398)
>     [junit] Caused by: java.lang.AssertionError
>     [junit] 	at org.apache.cassandra.io.sstable.SSTableReader.markObsolete(SSTableReader.java:1706)
>     [junit] 	at org.apache.cassandra.db.DataTracker.unmarkCompacting(DataTracker.java:240)
>     [junit] 	at org.apache.cassandra.io.sstable.SSTableRewriter.replaceWithFinishedReaders(SSTableRewriter.java:495)
>     [junit] 	at org.apache.cassandra.io.sstable.SSTableRewriter.finishAndMaybeThrow(SSTableRewriter.java:475)
>     [junit] 	at org.apache.cassandra.io.sstable.SSTableRewriter.finish(SSTableRewriter.java:416)
>     [junit] 	at org.apache.cassandra.io.sstable.SSTableRewriter.finish(SSTableRewriter.java:396)
>     [junit] 	at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:212)
>     [junit] 	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>     [junit] 	at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:72)
>     [junit] 	at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
>     [junit] 	at org.apache.cassandra.db.compaction.CompactionManager$7.runMayThrow(CompactionManager.java:512)
>     [junit] 	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>     [junit] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>     [junit] 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>     [junit] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     [junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     [junit] 	at java.lang.Thread.run(Thread.java:745)
>     [junit] 	Suppressed: java.lang.IllegalStateException: Attempted to release a reference
that has already been released
>     [junit] 		at org.apache.cassandra.utils.concurrent.Ref$State.release(Ref.java:173)
>     [junit] 		at org.apache.cassandra.utils.concurrent.Ref.release(Ref.java:77)
>     [junit] 		at org.apache.cassandra.utils.concurrent.Refs.release(Refs.java:212)
>     [junit] 		at org.apache.cassandra.db.DataTracker.replaceReaders(DataTracker.java:413)
>     [junit] 		at org.apache.cassandra.db.DataTracker.replaceEarlyOpenedFiles(DataTracker.java:322)
>     [junit] 		at org.apache.cassandra.io.sstable.SSTableRewriter.replaceWithFinishedReaders(SSTableRewriter.java:494)
>     [junit] 		at org.apache.cassandra.io.sstable.SSTableRewriter.abort(SSTableRewriter.java:252)
>     [junit] 		at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:218)
>     [junit] 
> {code}



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

Mime
View raw message