Select query shows nohostavailableexception without partition key in where condition

116 views Asked by At

I am trying to read rows from dev center and client apis but if i "select *" for all 2k rows it shows no host available exception in query trace though it has all the nodes up in cluster. but if i keep partition key in where condition it doesn't show any error. Can anyone help in finding the issue? Many thanks.

1

There are 1 answers

1
phact On

You're probably hitting timeouts. Doing select * from with no where clause is not a good idea as you'll potentially be hitting every node in your cluster. If this is just for testing, you can bump up your read timeouts (read_request_timeout_in_ms) in the yaml but you don't want to use a query like that in production.

For further insight use the query tracing feature in Dev Center which is pretty nice in the latest releases.