SACHINPRABHU avatar image
SACHINPRABHU asked Erick Ramirez commented

ALTER TABLE returns "ConfigurationException: Column family ID mismatch"

I am getting error while executing alter table script.

ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.cassandra.exceptions.ConfigurationException: Column family ID mismatch (found e5da3980-83eb-11ec-8c56-1b3845d1a791; expected c8ac48d0-83eb-11ec-8c56-1b3845d1a791)

However when I describe table ,I am seeing newly created column present. But I am bot able to access the new column.Its throwing below error InvalidRequest: Error from server: code=2200 [Invalid query] message="Undefined name xxxxxxxxx in selection clause"

Please help on the the issue

Note : We have 6 nodes and average of 90GB per node

Describe Keyspace output

hgtValue value is newly added column it's reflecting in describe table output but when i query selecting hgtValue its giving the error

CREATE TABLE demo.demoTable (
    projectid uuid,
    runid uuid,
    sampleid uuid,
    hgtValue text,
    PRIMARY KEY (projectid, runid, sampleid)
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

steve.lacerda avatar image steve.lacerda ♦ commented ·
Can you provide the output of nodetool describecluster? Also, just to provide a bit of insight. It sounds like maybe the schema didn't propagate correctly and thus you have some issues. Please provide the output of cqlsh> describe <keyspace> as well, within your question.
0 Likes 0 ·
SACHINPRABHU avatar image SACHINPRABHU steve.lacerda ♦ commented ·

nodetool describecluster output

Cluster Information:

Name: New Fragment App Cassandra Cluster

Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch

Partitioner: org.apache.cassandra.dht.Murmur3Partitioner

Schema versions:



0 Likes 0 ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

This exception indicates that you have a schema disagreement in your cluster:

ConfigurationException: Column family ID mismatch (found e5da3980-83eb-11ec-8c56-1b3845d1a791; expected c8ac48d0-83eb-11ec-8c56-1b3845d1a791

In my experience, the most common cause of this problem is that you dropped and re-created the table without waiting for the schema to propagate to all nodes in the cluster in between the DROP and CREATE. Alternatively, it's possible that you've tried to create the table and assumed it didn't work then tried to create it again.

In any case, Cassandra thinks the table was created at 05:48 GMT but found a version created at 05:49 GMT. For what it's worth:

  • e5da3980-83eb-11ec-8c56-1b3845d1a791 = February 2, 2022 at 5:49:33 AM GMT
  • c8ac48d0-83eb-11ec-8c56-1b3845d1a791 = February 2, 2022 at 5:48:44 AM GMT

You'll need to resolve the schema disagreement. Depending on the Cassandra version you can either (a) run nodetool resetlocalschema on nodes which have a different schema version based on the output of nodetool describecluster, or (b) perform a rolling restart of all nodes. Cheers!

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

SACHINPRABHU avatar image SACHINPRABHU commented ·
Hi @Erick Ramirez ,

We did not create or dropped table. We just altered the table added new column.

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ SACHINPRABHU commented ·

You may think that but it isn't correct. The table IDs (also known as column family IDs) are only generated when a table is created -- they do not change as long as the table exists regardless of how many times you modify the table.

The table IDs are time UUIDs which indicate the exact time the tables are created. Cheers!

0 Likes 0 ·