Fix NPE at ControlConnection.refreshNodeListAndTokenMap()

Description

Cluster.connect fails with the following stacktrace:

Environment

Linux, cassandra 2.0.17, datastax-driver 2.1.10

Pull Requests

None

Activity

Show:
Vladimir Kuzmin
April 8, 2016, 3:57 PM
Edited

Alexandre, you are right, I greped only cassandra logs, my product has the log:

[2016-04-07 21:02:17.485+0000] ["cluster22-worker-2"/10.153.246.175 ERROR] [com.datastax.driver.core.ControlConnection] [Error parsing schema from Cassandra system tables: the schema in Cluster#getMetadat
a() will appear incomplete or stale]
java.lang.NullPointerException
at com.datastax.driver.core.TableMetadata.equals(TableMetadata.java:412)
at com.datastax.driver.core.Metadata.updateTables(Metadata.java:278)
at com.datastax.driver.core.Metadata.updateKeyspaces(Metadata.java:245)
at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:72)
at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:383)
at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:315)
at com.datastax.driver.core.Cluster$Manager$SchemaRefreshRequestDeliveryCallback$1.runMayThrow(Cluster.java:2585)
at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Alex Dutra
April 8, 2016, 3:14 PM

but the stack trace you posted above has it:

Vladimir Kuzmin
April 8, 2016, 8:25 AM
Edited

Alexandre, got it, just in case, I don't see it:

grep "Error parsing" cassandra.log*

nothing

Alex Dutra
April 8, 2016, 8:22 AM

Created to track the second NPE.

Alex Dutra
April 8, 2016, 8:17 AM
Edited

The NPE in TableMetadata seems related to errors when parsing table options. Do you see in your logs this message: Error parsing schema options for table X.Y?

EDIT Sorry I just read your stack trace more carefully, and indeed this is the problem.

Fixed

Assignee

Alex Dutra

Reporter

Vladimir Kuzmin

Labels

None

PM Priority

None

Reproduced in

2.1.10

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Major