Be really cautious here, this can be deceptive

There are races in some versions of cassandra that can leave you with different 
combinations of cfid

The cfid is on disk for schema
It’s in memory for schema
It’s used for the table path on disk

Those three have to match for things to work properly and various races can 
make them mismatch

If you have one ID for the path and a different in the schema table on disk and 
you bounce, the database throws away the old directory and you start fresh with 
a new empty directory

So resetlocalschema May “fix” this but it may fix it by throwing away one copy 
of data

If only one host is out of sync you may want to pretend it died and replace it. 
Alternatively a ton of inspection can tell you which variation of mismatch you 
have and you can correct it properly but it’s more work than I’m prepared to 
type today

Sorry for the unpleasant reality.



> On Apr 5, 2020, at 3:38 PM, Erick Ramirez <erick.rami...@datastax.com> wrote:
> 
> 
>> Another suggestion before resetlocalschema. Try rolling restart all the 
>> nodes in the cluster and see if it fix the problem. After the restart all 
>> the nodes will use the same schema for the table.
> 
> That's a little bit heavy-handed. 🙂 Resetting a node's schema is a simple, 
> online operation that doesn't involve a cluster-wide restart. Cheers!

Reply via email to