Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10776

Prepare of statements after table creation fail with unconfigured column family

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None
    • Normal

    Description

      Cassandra 2.1.8

      We have multiple app instances trying to create the same table using IF NOT EXISTS.

      We check for schema agreement via the Java Driver before and after every statement.

      After creating the table we then prepare statements and we sometimes get:

      com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily locks
      	at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:50) ~[cassandra-driver-core-2.1.8.jar:na]
      	at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37) ~[cassandra-driver-core-2.1.8.jar:na]
      	at com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:79) ~[cassandra-driver-core-2.1.8.jar:na]
      	at uk.sky.cirrus.locking.CassandraLockingMechanism.init(CassandraLockingMechanism.java:69) ~[main/:na]
      	at uk.sky.cirrus.locking.Lock.acquire(Lock.java:35) [main/:na]
      	at uk.sky.cirrus.CqlMigratorImpl.migrate(CqlMigratorImpl.java:83) [main/:na]
      	at uk.sky.cirrus.locking.LockVerificationTest.lambda$shouldManageContentionsForSchemaMigrate$0(LockVerificationTest.java:90) [test/:na]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_60]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_60]
      

      Looking at the server logs we get:

      ava.lang.RuntimeException: org.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found 90bbb372-9446-11e5-b1ca-8119a6964819; expected 90b87f20-9446-11e5-b1ca-8119a6964819)
      	at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:1145) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.updateColumnFamily(DefsTables.java:422) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeColumnFamilies(DefsTables.java:295) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeSchemaInternal(DefsTables.java:194) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeSchema(DefsTables.java:166) ~[main/:na]
      	at org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(DefinitionsUpdateVerbHandler.java:49) ~[main/:na]
      	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[main/:na]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_60]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
      

      We found this issue which is marked as resolved:
      https://issues.apache.org/jira/browse/CASSANDRA-8387

      Does the IF NOT EXISTS just check the local node?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              barmybuckle Adam Dougal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: