You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mikhail Panchenko (JIRA)" <ji...@apache.org> on 2013/09/25 20:38:05 UTC

[jira] [Commented] (CASSANDRA-6089) client_only example does not work

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

Mikhail Panchenko commented on CASSANDRA-6089:
----------------------------------------------

Actually, the change I mention above stops the errors, but also short-circuits schema propagation :D I've sorted out what the code actually does and made a change that properly fixes the issue. Patch incoming, please hold.
                
> client_only example does not work
> ---------------------------------
>
>                 Key: CASSANDRA-6089
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6089
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Mikhail Panchenko
>
> client_only example fails out of the box with:
> {code}
> 13/09/24 11:44:53 INFO gms.Gossiper: Node /127.0.0.1 is now part of the cluster
> 13/09/24 11:44:53 INFO gms.Gossiper: InetAddress /127.0.0.1 is now UP
> 13/09/24 11:44:53 ERROR concurrent.DebuggableThreadPoolExecutor: Error in ThreadPoolExecutor
> java.lang.NullPointerException
>   at org.apache.cassandra.service.MigrationManager.maybeScheduleSchemaPull(MigrationManager.java:113)
> 	at org.apache.cassandra.service.MigrationManager.onAlive(MigrationManager.java:95)
> 	at org.apache.cassandra.gms.Gossiper.markAlive(Gossiper.java:803)
> 	at org.apache.cassandra.gms.Gossiper.handleMajorStateChange(Gossiper.java:846)
> 	at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:931)
> 	at org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:50)
> 	at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> 	at java.lang.Thread.run(Thread.java:680)
> Exception in thread "GossipStage:1" java.lang.NullPointerException
> 	at org.apache.cassandra.service.MigrationManager.maybeScheduleSchemaPull(MigrationManager.java:113)
> 	at org.apache.cassandra.service.MigrationManager.onAlive(MigrationManager.java:95)
> 	at org.apache.cassandra.gms.Gossiper.markAlive(Gossiper.java:803)
> 	at org.apache.cassandra.gms.Gossiper.handleMajorStateChange(Gossiper.java:846)
> 	at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:931)
> 	at org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:50)
> 	at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> 	at java.lang.Thread.run(Thread.java:680)
> {code}
> I've tested this both on the 1.2.8 tag and with 1.2 latest.
> The line in question is 
> {code:java}
> if (Schema.instance.getVersion().equals(theirVersion) || !shouldPullSchemaFrom(endpoint))
> {code}
> Seems that {{Schema.instance.getVersion()}} returns null in the client_only case. Adding a {{Schema.instance.getVersion() == null}} as another {{||}} in the conditional appears to fix it, but I don't remember the codepaths well enough to confidently say that that's the correct thing to do.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira