You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Caleb Rackliffe (Jira)" <ji...@apache.org> on 2020/09/03 22:56:00 UTC

[jira] [Commented] (CASSANDRA-15949) NPE thrown while updating speculative execution time if table is removed during task execution

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

Caleb Rackliffe commented on CASSANDRA-15949:
---------------------------------------------

[~jmeredithco] Took a quick look, and it seems like this is nominally a consequence of {{Schema#keyspaces}} and {{Schema#metadataRefs}} not really being synchronized in any way. (i.e. The {{Keyspace}} constructor finds {{TableMetadata}}, but there is no {{TableMetadataRef}} present by the time we need to pass it to {{initCf()}}). My first instinct is to do two things:

1.) Catch and log at WARN all exceptions from anywhere in the recomputation task rather than halting node-wide.
2.) Apprehend null {{TableMetadataRef}} references in the {{Keyspace}} constructor and log at INFO to avoid stopping progress even within a particular recomputation task for something transient like this.

I'll work out a test that hits the original error and push up a patch w/ the above shortly...

> NPE thrown while updating speculative execution time if table is removed during task execution
> ----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15949
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15949
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Other
>            Reporter: Jon Meredith
>            Assignee: Caleb Rackliffe
>            Priority: Normal
>             Fix For: 4.0-beta
>
>
> CASSANDRA-14338 fixed the scheduling the speculation retry threshold calculation, but if the task happens to be scheduled while a table is being dropped, it triggers an NPE. 
> ERROR 2020-07-14T11:34:55,762 [OptionalTasks:1] org.apache.cassandra.service.CassandraDaemon:446 - Exception in thread Thread[OptionalTasks:1,5,main]
> java.lang.NullPointerException: null
>        at org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:444) ~[cassandra-4.0.0.jar:4.0.0]
>        at org.apache.cassandra.db.Keyspace.<init>(Keyspace.java:346) ~[cassandra-4.0.0.jar:4.0.0]
>        at org.apache.cassandra.db.Keyspace.open(Keyspace.java:139) ~[cassandra-4.0.0.jar:4.0.0]
>        at org.apache.cassandra.db.Keyspace.open(Keyspace.java:116) ~[cassandra-4.0.0.jar:4.0.0]
>        at org.apache.cassandra.db.Keyspace$1.apply(Keyspace.java:102) ~[cassandra-4.0.0.jar:4.0.0]
>        at org.apache.cassandra.db.Keyspace$1.apply(Keyspace.java:99) ~[cassandra-4.0.0.jar:4.0.0]
>        at com.google.common.collect.Iterables$5.lambda$forEach$0(Iterables.java:704) ~[guava-27.0-jre.jar:?]
>        at com.google.common.collect.IndexedImmutableSet.forEach(IndexedImmutableSet.java:45) ~[guava-27.0-jre.jar:?]
>        at com.google.common.collect.Iterables$5.forEach(Iterables.java:704) ~[guava-27.0-jre.jar:?]
>        at org.apache.cassandra.service.CassandraDaemon.lambda$setup$2(CassandraDaemon.java:412) ~[cassandra-4.0.0.jar:4.0.0]
>        at org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor$UncomplainingRunnable.run(DebuggableScheduledThreadPoolExecutor.java:118) [cassandra-4.0.0.jar:4.0.0]
>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
>        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
>        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
>        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.37.Final.jar:4.1.37.Final]
>        at java.lang.Thread.run(Thread.java:834) [?:?]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org