It doesn't make any sense to see consistency level ALL if the code is
not explicitly using it. My best guess is somewhere in the code the
consistency level was overridden.
On 21/07/2022 14:52, pwozniak wrote:
Hi,
we have the following code (java driver):
cluster =Cluster.builder().addContactPoints(contactPoints).withPort(port)
.withProtocolVersion(ProtocolVersion.V3)
.withQueryOptions(new QueryOptions()
.setConsistencyLevel(ConsistencyLevel.QUORUM))
.withTimestampGenerator(new AtomicMonotonicTimestampGenerator())
.withCredentials(userName, password).build();
session =cluster.connect(keyspaceName);
where ConsistencyLevel.QUORUM is our default consistency level. But we
keep receiving the following exceptions:
com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra
timeout during read query at consistency ALL (3 responses were
required but only 2 replica responded)
Why the consistency level is ALL in there? Availability of our cluster
is reduced because of that. We verified all our source code and
haven't found places where ALL is set.
We also did heap dump and found only ConsistencyLevel.QUORUM there.
Regards,
Pawel