Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Artificially create Cassandra error to test retry policy

How might you force a Cassandra error that triggers a retry policy?

According to the DataStax, the following errors trigger a retry policy:

  • Read and write timeouts.
  • When the coordinator determines there are not enough replicas to satisfy a request.

Edit: The driver I'm using is called gocql

like image 233
Tantillo Avatar asked Nov 02 '25 06:11

Tantillo


1 Answers

Toggle the network connection of a node off, and it will appear momentarily down. Any request that needed that node to satisfy the consistency level, or if that node was the co-ordinator of the query will need to retry.

like image 199
Andrew Avatar answered Nov 03 '25 18:11

Andrew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!