Reputation: 191
I know I can set consistency levels from cqlsh or for a client. if setting consistency level on ideal_consistency_level on the cassandra.yaml, will it set the consistency level for both reads and writes? So I don't have to do it on using cqlsh or any client.
Upvotes: 1
Views: 266
Reputation: 2996
There is no way to set a default consistency level for Cassandra on the server side.
If you want, you can change the hard-coded default of the cqlsh client by editing your cqlsh.py
file, look at the line:
self.consistency_level = cassandra.ConsistencyLevel.ONE
and set it appropriately.
For your java driver, the default is one.
ideal_consistency_level is not a default consistency level. It was introduced in Cassandra 4.0, which is not yet scheduled for release. You only have access to Cassandra 4.0 if you compile Cassandra yourself from the correct branch. You configure ideal_consistency_level in order to get an idea of how likely you could have achieved a higher write consistency level than the one you are currently using. If you configure it, you then have access to two additional keyspace metrics that indicate the fail count, and ideal consistency latency.
Upvotes: 1