Reputation: 8896
When adding a column to a table using cqlsh
, I get the following error message:
ALTER TABLE table ADD dataVersion text;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found dbed2170-c53c-11e7-a6f8-6fd66506919d; expected db9404f0-c53c-11e7-8529-65b72ab1f7cf)
What does it really mean and what should I do with it? Is it a bug? The column seems to be added successfully.
Cassandra version is 3.0.14
Upvotes: 3
Views: 5533
Reputation: 429
Flushing memtables (nodetool flush
) did it for us.
Flushing does not require restarting cassandra whereas draining does.
Upvotes: 1
Reputation: 41
What does it really mean and what should I do with it?
When you make a schema change, it needs to be propagated. If you change the schema in different nodes before propagation you will end up with different schema versions (ID). Then this error will be raised.
Another situation happens if you make a schema change multiple times, even on the same node, before changes are applied this error will be raised too.
One solution is to restart Cassandra (drain, stop and start again). Avoid applying schema changes concurrently.
Is it a bug? The column seems to be added successfully.
Indeed, they are. But each node may have a different schema. Information on present schemas can be retrieved with nodetool describecluster.
How to drain a cassandra node: https://docs.datastax.com/en/cassandra/3.0/cassandra/tools/toolsDrain.html
Usage of describecluster: https://docs.datastax.com/en/cassandra/3.0/cassandra/tools/toolsDescribeCluster.html
Upvotes: 4