I came across this problem a few years ago, and had long conversations with 
Datastax support about it. 

In my case it turns out that the error message is misleading and I was pointed 
to the ticket: https://issues.apache.org/jira/browse/CASSANDRA-14715

I con’t remember much about it now,  but see if that ticket applies to your 
experience. 

Thanks 

Paul Chandler

> On 21 Jul 2022, at 15:12, pwozniak <pwozn...@man.poznan.pl> wrote:
> 
> Yes, I did it. Nothing like this in my code. Consistency level is set only in 
> one place (shown below).
> 
> 
> 
> On 7/21/22 4:08 PM, manish khandelwal wrote:
>> Consistency can also be set on a statement basis. So please check in your 
>> code that you might be setting consistency 'ALL' for some queries.
>> 
>> On Thu, Jul 21, 2022 at 7:23 PM pwozniak <pwozn...@man.poznan.pl 
>> <mailto:pwozn...@man.poznan.pl>> 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
>> 

Reply via email to