Sample Header Ad - 728x90

Handling DriverTimeoutException in DataStax Java Driver 4.13.0 Without Retrying Non-Idempotent Requests

0 votes
2 answers
87 views
Using datastax-java-driver-core 4.13.0 to connect the Java application to Cassandra. When a Cassandra node goes down, all in-flight requests to that node fail with a DriverTimeoutException. This exception is not handled by DefaultRetryPolicy, meaning no automatic retry happens. The requests are non-idempotent, so implementing a custom retry mechanism risks duplicate writes. **Questions:** How can we gracefully handle DriverTimeoutException without causing duplicate writes? Is there a recommended way to retry only safe operations in such scenarios while preventing data inconsistency? Are there any DataStax-recommended strategies to mitigate request failures when nodes go down? Any guidance or best practices would be greatly appreciated!
Asked by Ashwani Kumar (1 rep)
Feb 5, 2025, 12:50 PM
Last activity: Feb 6, 2025, 01:17 AM