sky-uk / cqlmigrate

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

CassandraLockingMechanism uses Cassandra's default consistency level #30

Closed oliverlockwood closed 7 years ago

oliverlockwood commented 8 years ago

This should surely obey the read and write consistency levels (LOCAL_ONE and ALL, respectively) that are used elsewhere in cqlmigrate?

@adamdougal @chbatey @sebbonnet @jsravn @balooo your thoughts welcomed.

chbatey commented 7 years ago

All the statement s are LWTs so I don't think this is a good idea. LWTs already require a QUORUM of nodes to be up and the normal consistency level is only used if it is set to ALL on commit. I think ALL would be far too unavailable for this and I don't see it giving us anything.

We should perhaps allow the user to specify the prepare consistency (LOCAL_SERIAL or SERIAL).

oliverlockwood commented 7 years ago

@chbatey thanks for the clarification - I'll close this issue. For others interested, this page is a good reference on LWTs (identified by the presence of the IF clause): http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0