[
https://issues.apache.org/jira/browse/CASSANDRA-12336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Lebresne updated CASSANDRA-12336:
-----------------------------------------
Reviewer: Carl Yeksigian
Status: Patch Available (was: Open)
The patch for CASSANDRA-11988 wasn't thorough enough. While the iterator won't
return {{null}} static rows, we may still have {{BaseRows.staticRow == null}}
after a transformation, and since transformation are "chained", we can end up
passing a {{null}} to an {{applytoStatic()}} call, which shouldn't really be
done. Anyway, it's pretty easy to fix by guarding the call to
{{applytoStatic()}} (much like the call to {{applyToRow()}} is for that matter).
I was surprised the test added by {{CASSANDRA-11988}} didn't catch it but it
appears to be a timing issue: even though the test sets {{gc_grace == 0}}, it
should wait at least 1 second to make sure stuffs gets purged, and I get to
reproduce consistently with that additional wait (including in the patch below).
| [12336-3.0|https://github.com/pcmanus/cassandra/commits/12336-3.0] |
[utests|http://cassci.datastax.com/job/pcmanus-12336-3.0-testall] |
[dtests|http://cassci.datastax.com/job/pcmanus-12336-3.0-dtest] |
| [12336-3.9|https://github.com/pcmanus/cassandra/commits/12336-3.9] |
[utests|http://cassci.datastax.com/job/pcmanus-12336-3.9-testall] |
[dtests|http://cassci.datastax.com/job/pcmanus-12336-3.9-dtest] |
> NullPointerException during compaction on table with static columns
> -------------------------------------------------------------------
>
> Key: CASSANDRA-12336
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12336
> Project: Cassandra
> Issue Type: Bug
> Components: Compaction
> Environment: cqlsh 5.0.1
> Cassandra 3.0.8-SNAPSHOT (3.0.x dev - a5cbb0)
> Reporter: Evan Prothro
> Assignee: Sylvain Lebresne
> Fix For: 3.0.9
>
>
> After being affected by
> https://issues.apache.org/jira/browse/CASSANDRA-11988, we built a5cbb0.
> Compaction still fails with the following trace:
> {code}
> WARN [SharedPool-Worker-2] 2016-07-28 10:51:56,111
> AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread
> Thread[SharedPool-Worker-2,5,main]: {}
> java.lang.RuntimeException: java.lang.NullPointerException
> at
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2453)
> ~[main/:na]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> ~[na:1.8.0_72]
> at
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
> ~[main/:na]
> at
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136)
> [main/:na]
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
> [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
> Caused by: java.lang.NullPointerException: null
> at
> org.apache.cassandra.db.ReadCommand$1MetricRecording.applyToRow(ReadCommand.java:466)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadCommand$1MetricRecording.applyToStatic(ReadCommand.java:460)
> ~[main/:na]
> at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:105)
> ~[main/:na]
> at
> org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:41)
> ~[main/:na]
> at
> org.apache.cassandra.db.transform.Transformation.add(Transformation.java:156)
> ~[main/:na]
> at
> org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:122)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadCommand$1MetricRecording.applyToPartition(ReadCommand.java:454)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadCommand$1MetricRecording.applyToPartition(ReadCommand.java:438)
> ~[main/:na]
> at
> org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96)
> ~[main/:na]
> at
> org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:295)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:138)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:134)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76)
> ~[main/:na]
> at
> org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:320)
> ~[main/:na]
> at
> org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1796)
> ~[main/:na]
> at
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2449)
> ~[main/:na]
> ... 5 common frames omitted
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)