cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fredrik LS (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8238) NPE in SizeTieredCompactionStrategy.filterColdSSTables
Date Thu, 12 Mar 2015 20:47:38 GMT


Fredrik LS commented on CASSANDRA-8238:

Reproduced this in 2.1.3.
I'm not very familiar with the Cassandra code base but took me the liberty to do some debugging.
This occurs when doing bulkloading from JMX. 
The problem is that the {code}SSTableLoader{code} has a static initializer setting 
(I guess going through JMX shouldn't be considered client mode but only when running SSTableLoader
Every SSTableReader created after the {code}clientMode{code} flag is set will have the {code}readMeter{code}
set to null according to the SSTableReader constructor. The SSTableReader for SSTables existing
at startup will have the readMeter set to some value but when JMX bulkloading is used, there
will be a mix of SSTableReader for the same CF both with readMeter with a value and readMeter
with null. That in combination with hot and cold SSTables in {code}SizeTieredCompactionStrategy.filterColdSSTables(...){code}
will trigger the {code}NullPointerException{code} when CompactionExecutor kicks in trying
to compact the "hot" SSTables already existing from startup which have a readMeter set and
the just streamed cold SSTables from JMX bulkloading which have readMeter set to null.

Hope my analyze is correct  and that the code formatting isn't too bad.


> NPE in SizeTieredCompactionStrategy.filterColdSSTables
> ------------------------------------------------------
>                 Key: CASSANDRA-8238
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tyler Hobbs
>            Assignee: Marcus Eriksson
>             Fix For: 2.1.3
>         Attachments: 0001-assert-that-readMeter-is-not-null.patch
> {noformat}
> ERROR [CompactionExecutor:15] 2014-10-31 15:28:32,318 - Exception
in thread Thread[CompactionExecutor:15,1,main]
>     java.lang.NullPointerException: null
>     at org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy.filterColdSSTables(
>     at org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy.getNextBackgroundSSTables(
>     at org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy.getNextBackgroundTask(
>     at org.apache.cassandra.db.compaction.CompactionManager$
>     at java.util.concurrent.Executors$ ~[na:1.7.0_72]
>     at ~[na:1.7.0_72]
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(
>     at java.util.concurrent.ThreadPoolExecutor$
>     at [na:1.7.0_72]
> {noformat}

This message was sent by Atlassian JIRA

View raw message