RE: [EXTERNAL] Re: Python driver concistency problem

2019-05-28 Thread Durity, Sean R
This is a stretch, but are you using authentication and/or authorization? In my 
understanding the queries executed for you to do the authentication and/or 
authorization are usually done at LOCAL_ONE (or QUORUM for cassandra user), but 
maybe there is something that is changed in the security setup? Any UDTs or 
triggers involved in the query? To me, your error seems more like a query being 
executed “for you” instead of your actual query.


Sean Durity


From: Vlad 
Sent: Wednesday, May 22, 2019 6:53 AM
To: user@cassandra.apache.org
Subject: [EXTERNAL] Re: Python driver concistency problem

That's the issue - I do not use consistency ALL. I set QUORUM or ONE but it 
still performs with ALL.

On Wednesday, May 22, 2019 12:42 PM, shalom sagges 
mailto:shalomsag...@gmail.com>> wrote:

In a lot of cases, the issue is with the data model.
Can you describe the table?
Can you provide the query you use to retrieve the data?
What's the load on your cluster?
Are there lots of tombstones?

You can set the consistency level to ONE, just to check if you get responses. 
Although normally I would never use ALL unless I run a DDL command.
I prefer local_quorum if I want my consistency to be strong while keeping 
Cassandra's high availability.

Regards,









The information in this Internet Email is confidential and may be legally 
privileged. It is intended solely for the addressee. Access to this Email by 
anyone else is unauthorized. If you are not the intended recipient, any 
disclosure, copying, distribution or any action taken or omitted to be taken in 
reliance on it, is prohibited and may be unlawful. When addressed to our 
clients any opinions or advice contained in this Email are subject to the terms 
and conditions expressed in any applicable governing The Home Depot terms of 
business or client engagement letter. The Home Depot disclaims all 
responsibility and liability for the accuracy and content of this attachment 
and for any damages or losses arising from any inaccuracies, errors, viruses, 
e.g., worms, trojan horses, etc., or other items of a destructive nature, which 
may be contained in this attachment and shall not be liable for direct, 
indirect, consequential or special damages in connection with this e-mail 
message or its attachment.


Re: Python driver concistency problem

2019-05-22 Thread Vlad
That's the issue - I do not use consistency ALL. I set QUORUM or ONE but it 
still performs with ALL. 

On Wednesday, May 22, 2019 12:42 PM, shalom sagges  
wrote:
 

 In a lot of cases, the issue is with the data model. 
Can you describe the table?
Can you provide the query you use to retrieve the data?What's the load on your 
cluster?Are there lots of tombstones?
You can set the consistency level to ONE, just to check if you get responses. 
Although normally I would never use ALL unless I run a DDL command. 
I prefer local_quorum if I want my consistency to be strong while keeping 
Cassandra's high availability. 

Regards,






   

Re: Python driver concistency problem

2019-05-22 Thread shalom sagges
In a lot of cases, the issue is with the data model.
Can you describe the table?
Can you provide the query you use to retrieve the data?
What's the load on your cluster?
Are there lots of tombstones?

You can set the consistency level to ONE, just to check if you get
responses. Although normally I would never use ALL unless I run a DDL
command.
I prefer local_quorum if I want my consistency to be strong while keeping
Cassandra's high availability.

Regards,


Re: Python driver concistency problem

2019-05-22 Thread Vlad
Hi,
I do reads in my own Python code, how cqlsh can affect it? 

On Wednesday, May 22, 2019 12:02 PM, Chakravarthi Manepalli 
 wrote:
 

 Hi Vlad,
Maybe the consistency level has been set manually in CQLSH. Did you try 
checking your consistency level and set it back to normal? (Just a thought, Not 
sure!!)
On Wed, May 22, 2019 at 2:00 PM Vlad  wrote:

Hi,
we have three nodes cluster with KS defined as 

CREATE KEYSPACE someks WITH REPLICATION = { 'class' : 
'org.apache.cassandra.locator.NetworkTopologyStrategy', 'some-dc': '3' } AND 
DURABLE_WRITES = true;

next I read with Pyhton (cassandra-driver 3.11) from Cassandra 3.11.3 and get 
error 

Error from server: code=1200 [Coordinator node timed out waiting for replica 
nodes' responses] message="Operation timed out - received only 2 responses." 
info={'received_responses': 2, 'required_responses': 3, 'consistency': 'ALL'}
nor session.default_consistency_level = ConsistencyLevel.QUORUM neither 
query = SimpleStatement("SELECT **", 
consistency_level=ConsistencyLevel.QUORUM)
rows = session.execute(query)

helps. What it could be?

Thanks in advance.




   

Re: Python driver concistency problem

2019-05-22 Thread Chakravarthi Manepalli
Hi Vlad,

Maybe the consistency level has been set manually in CQLSH. Did you try
checking your consistency level and set it back to normal? (Just a thought,
Not sure!!)

On Wed, May 22, 2019 at 2:00 PM Vlad  wrote:

> Hi,
>
> we have three nodes cluster with KS defined as
>
> *CREATE KEYSPACE someks WITH REPLICATION = { 'class' :
> 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'some-dc': '3' }
> AND DURABLE_WRITES = true;*
>
> next I read with Pyhton (cassandra-driver 3.11) from Cassandra 3.11.3 and
> get error
>
> *Error from server: code=1200 [Coordinator node timed out waiting for
> replica nodes' responses] message="Operation timed out - received only 2
> responses." info={'received_responses': 2, 'required_responses': 3,
> 'consistency': 'ALL'}*
>
> nor *session.default_consistency_level = ConsistencyLevel.QUORUM* neither
>
> *query = SimpleStatement("SELECT **",
> consistency_level=ConsistencyLevel.QUORUM)rows = session.execute(query)*
>
> helps. What it could be?
>
> Thanks in advance.
>
>


Python driver concistency problem

2019-05-22 Thread Vlad
Hi,
we have three nodes cluster with KS defined as 

CREATE KEYSPACE someks WITH REPLICATION = { 'class' : 
'org.apache.cassandra.locator.NetworkTopologyStrategy', 'some-dc': '3' } AND 
DURABLE_WRITES = true;

next I read with Pyhton (cassandra-driver 3.11) from Cassandra 3.11.3 and get 
error 

Error from server: code=1200 [Coordinator node timed out waiting for replica 
nodes' responses] message="Operation timed out - received only 2 responses." 
info={'received_responses': 2, 'required_responses': 3, 'consistency': 'ALL'}
nor session.default_consistency_level = ConsistencyLevel.QUORUM neither 
query = SimpleStatement("SELECT **", 
consistency_level=ConsistencyLevel.QUORUM)
rows = session.execute(query)

helps. What it could be?

Thanks in advance.