Problem
I would like to set a timeout for a specific readonly query using the dotnet driver.
Context
I have a query likeselect count(*) from TABLE where ID=value
I am aware that:
- count(*) queries are not efficient
- there is no guarantee that that query will return correct results
- it will make full cluster scan
Despite all this, I still want to run that query once every 3-4 months.
Requirements:
- specify the timeout from the dotnet driver
- do not touch any cassandra server yml configuration
What I have tries I have big database locally on a single node. When I set a timeout to the query it is respected and everything works. In several minutes I got results. However, when I have a cluster of 5 nodes, a coordinator node gets the query and executes it against the other nodes and it hits 5 seconds timeout. Any timeouts which I have configured throught the driver for the socket or for the query are ignored. I also tried with all possible consistency levels. Also tried to use retry policy which ignores the errors.
Elders/Cronus.Persistence.Cassandra
Question Is it possible to set a timeout for a readonly query through the dotnet driver when cassandra is configured in a cluster?