[
https://issues.apache.org/jira/browse/CASSANDRA-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223060#comment-13223060
]
Peter Schuller commented on CASSANDRA-3952:
-------------------------------------------
I tried the patch on a local node with pre-existing data on which I altered the
CF for leveled compaction strategy. One to a few compactions into taking stress
writes I got the below trace. With the patch applied, line 185 is the "newLevel
> 0" assertion.
I am not sure yet whether this has anything to do at all with the patch though;
I don't think so. Investigating.
{code}
java.lang.AssertionError
at
org.apache.cassandra.db.compaction.LeveledManifest.promote(LeveledManifest.java:185)
at
org.apache.cassandra.db.compaction.LeveledCompactionStrategy.handleNotification(LeveledCompactionStrategy.java:135)
at
org.apache.cassandra.db.DataTracker.notifySSTablesChanged(DataTracker.java:526)
at
org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:249)
at
org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:948)
at
org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:204)
at
org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:46)
at
org.apache.cassandra.db.compaction.CompactionManager$1.runMayThrow(CompactionManager.java:128)
at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:26)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
{code}
> avoid quadratic startup time in LeveledManifest
> -----------------------------------------------
>
> Key: CASSANDRA-3952
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3952
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jonathan Ellis
> Assignee: Dave Brosius
> Priority: Minor
> Labels: lhf
> Fix For: 1.1.1
>
> Attachments: speed_up_level_of.diff
>
>
> Checking that each sstable is in the manifest on startup is O(N**2) in the
> number of sstables:
> {code}
> . // ensure all SSTables are in the manifest
> for (SSTableReader ssTableReader : cfs.getSSTables())
> {
> if (manifest.levelOf(ssTableReader) < 0)
> manifest.add(ssTableReader);
> }
> {code}
> {code}
> private int levelOf(SSTableReader sstable)
> {
> for (int level = 0; level < generations.length; level++)
> {
> if (generations[level].contains(sstable))
> return level;
> }
> return -1;
> }
> {code}
> Note that the contains call is a linear List.contains.
> We need to switch to a sorted list and bsearch, or a tree, to support
> TB-levels of data in LeveledCompactionStrategy.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira