spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
374 stars 310 forks source link

Add exception translation for `DriverTimeoutException` #1399

Closed mipo256 closed 1 year ago

mipo256 commented 1 year ago

Cassandra spring-data module does not recogize the DriverTimeoutException, which essentially means that driver has timed out during interaction with cluster in general.

Maybe we should consider to not throw QueryTimeoutException, but create a separate one, specifically for this case.

@mp911de @schauder please, take a look.

mp911de commented 1 year ago

It makes sense to add the mapping. Care to retain the original cause and add unit tests?

mipo256 commented 1 year ago

Of course, I will. So I'll just:

  1. Create new Exception mapping for this DriverTimeoutException of datastax driver
  2. Add a unit test for this case and preserve the cause
mipo256 commented 1 year ago

@mp911de Done)

mp911de commented 1 year ago

Thank you for your contribution. That's merged and polished now.