sky-uk / cqlmigrate

Cassandra schema migration library
BSD 3-Clause "New" or "Revised" License
47 stars 29 forks source link

Ensure schema is in agreement after every migration #11

Closed adamdougal closed 7 years ago

adamdougal commented 8 years ago

As shown on this page:

https://datastax.github.io/java-driver/2.1.8/features/metadata/

It is possible for a schema changing query to return successfully even if it timed out. This causes an issue when one query alters the schema and the next query to be run requires that schema change. To ensure this doesn't happen we should check after every query that the schema is in agreement and fail if not.

oliverlockwood commented 8 years ago

The default timeout is 10 seconds, btw.

Incidentally we have seen some issues recently where schema agreement is reporting 'true' and we are proceeding to the next operation (in about 10 ms, so nowhere near the timeout!) but then a subsequent and dependent operation is failing. See https://issues.apache.org/jira/browse/CASSANDRA-11288 for more on this, as raised with Cassandra.

jsravn commented 7 years ago

I'm not sure this will improve things. Can't the metadata retrieved in the drive be wrong or stale as well? How often does the driver refresh it, etc.?

Closing, reopen if you guys think this is really necessary.