1
votes

We're using the datastax java driver (v3.6.0) to connect to Cassandra (v3.11). Whenever our infra team is shutting down Cassandra on a node (to patch the OS, node by node), our queries keep running just fine. However, we do see quite some errors in the logs caused by NullPointers in the datastax driver:

Error parsing schema from Cassandra system tables: the schema in Cluster#getMetadata() will appear incomplete or stale

java.lang.NullPointerException: null
    at c.d.d.mapping.MappingManager$1.onTableChanged(MappingManager.java:160)
    at c.d.driver.core.Metadata.triggerOnTableChanged(Metadata.java:696)
    at c.d.driver.core.SchemaParser.updateTables(SchemaParser.java:484)
    at c.d.driver.core.SchemaParser.refresh(SchemaParser.java:130)
    at c.d.d.core.ControlConnection.refreshSchema(ControlConnection.java:408)
    at c.d.d.core.ControlConnection.refreshSchema(ControlConnection.java:354)
    at c.d.d.c.Cluster$Manager$SchemaRefreshRequestDeliveryCallback$1.runMayThrow(Cluster.java:2867)
    at c.d.d.c.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32)
    at j.u.c.Executors$RunnableAdapter.call(Executors.java:511)
    at c.g.c.u.c.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111)
    at c.g.c.u.c.InterruptibleTask.run(InterruptibleTask.java:58)
    at c.g.c.u.c.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75)
    at j.u.c.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at j.u.c.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at i.n.u.c.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)

Does this look familiar to anyone? While googling for this issue I could not find much, so I wonder if we're doing something wrong or this is a known issue...

1
Are you sure about the version? The line numbers in the stack trace don't match, it looks like you might be using an earlier version, e.g. 3.5.1 (source). Note that the mapper comes as a separate artifact, so maybe your dependencies have different versions.Olivier Michallat
Thanks for your answer, you're absolutely right! I confused the version number for this particular trace. However, I do get the same problem with the version I mentioned as well (3.6.0). I updated the trace in the post.Pepijn de Jong

1 Answers

1
votes

This is a bug in the driver. I've created a JIRA ticket: JAVA-2223.