What happens when a query's requested consistency level cannot be satisfied, and what is an UnavailableException?
Last updated
Before executing, the coordinator counts live replicas for the partition. If fewer than the consistency level requires (e.g.
QUORUMneeds 2 of RF=3 but only 1 is up), it rejects the query with anUnavailableException.Unlike
WriteTimeoutException/ReadTimeoutException(attempted but replicas didn't respond in time), an unavailable error means the operation was never started.Mitigate by lowering the consistency level, raising the replication factor (RF), spreading replicas across racks/DCs, or retrying after a replica recovers.
- https://www.netdata.cloud/guides/cassandra/cassandra-unavailable-exception/
- https://apache.github.io/cassandra-java-driver/4.19.0/core/retries/
- https://docs.datastax.com/en/dse/6.9/architecture/database-internals/client-requests-write.html
- https://axonops.com/docs/data-platforms/cassandra/application-development/drivers/policies/retry/