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

Jeff Griffith edited comment on CASSANDRA-5589 at 9/25/14 3:49 PM:
-------------------------------------------------------------------

hi [~jbellis], it looks like this problem may not have been the total # of 
generations allocated because I can still see this in 1.2.19. The stack trace 
is the same as Jeremy's however the index out of bounds is 9 (log 10 of 1 
billion=9 from your fix.) skipLevels does not check newLevel against 
generations.length however the fix obviously isn't that simple since it needs 
to return the newLevel... some other logic problem in the loop termination?

    private int skipLevels(int newLevel, Iterable<SSTableReader> added)
    {
        while (maxBytesForLevel(newLevel) < SSTableReader.getTotalBytes(added)
            && generations[(newLevel + 1)].isEmpty())
        {
            newLevel++;
        }
        return newLevel;
    }

Apparently, this seems to have begun when someone set the max sstable size to 
400MB. Going back to 300MB it seems to have gone away.


was (Author: jeffery.griffith):
hi [~jbellis], it looks like this problem may not have been the total # of 
generations allocated because I can still see this in 1.2.19. The stack trace 
is the same as Jeremy's however the index out of bounds is 9 (log 10 of 1 
billion=9 from your fix.) skipLevels does not check newLevel against 
generations.length however the fix obviously isn't that simple since it needs 
to return the newLevel... some other logic problem in the loop termination?

    private int skipLevels(int newLevel, Iterable<SSTableReader> added)
    {
        while (maxBytesForLevel(newLevel) < SSTableReader.getTotalBytes(added)
            && generations[(newLevel + 1)].isEmpty())
        {
            newLevel++;
        }
        return newLevel;
    }

> ArrayIndexOutOfBoundsException in LeveledManifest
> -------------------------------------------------
>
>                 Key: CASSANDRA-5589
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5589
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: Jeremy Hanna
>            Assignee: Jonathan Ellis
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.2.6
>
>         Attachments: 5589.txt
>
>
> The following stack trace was in the system.log:
> {quote}
> ERROR [CompactionExecutor:2] 2013-05-22 16:19:32,402 CassandraDaemon.java 
> (line 174) Exception in thread Thread[CompactionExecutor:2,1,main]
>  java.lang.ArrayIndexOutOfBoundsException: 5
>       at 
> org.apache.cassandra.db.compaction.LeveledManifest.skipLevels(LeveledManifest.java:176)
>       at 
> org.apache.cassandra.db.compaction.LeveledManifest.promote(LeveledManifest.java:215)
>       at 
> org.apache.cassandra.db.compaction.LeveledCompactionStrategy.handleNotification(LeveledCompactionStrategy.java:155)
>       at 
> org.apache.cassandra.db.DataTracker.notifySSTablesChanged(DataTracker.java:410)
>       at 
> org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:223)
>       at 
> org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:991)
>       at 
> org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:230)
>       at 
> org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
>       at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>       at 
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:58)
>       at 
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:60)
>       at 
> org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:188)
> {quote}



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

Reply via email to