A number of properties in spring.data.cassandra.request.throttler have a default value in Spring Boot but their counterpart in Cassandra do not, see:

  • TypedDriverOption.REQUEST_THROTTLER_MAX_QUEUE_SIZE
  • TypedDriverOption.REQUEST_THROTTLER_MAX_CONCURRENT_REQUESTS)
  • TypedDriverOption.REQUEST_THROTTLER_MAX_REQUESTS_PER_SECOND)
  • TypedDriverOption.REQUEST_THROTTLER_DRAIN_INTERVAL)

We should stop configuring those unless the user has provided a value. When opting-in for a certain throttling type, some properties may become mandatory and lead to a failure if not set explicitly. We may need to add a failure analyzer to cover that case.

Comment From: snicoll

Flagging for team attention as I am not sure where to backport this. The current default may not be suitable but removing it may break existing apps that have opted-in for this feature, see https://github.com/spring-projects/spring-boot/pull/25130 for more details.

Comment From: snicoll

I've a test where I assert that DefaultDriverOption.REQUEST_THROTTLER_CLASS is RateLimitingRequestThrottler after I set this property (and only that): spring.data.cassandra.request.throttler.type=rate-limiting. I've removed all the defaults above locally and the test passes.

That is because I should attempt to create a CqlSession. When I do, I get:

nested exception is java.lang.IllegalArgumentException: Error instantiating class RateLimitingRequestThrottler (specified by advanced.throttler.class): Environment: No configuration setting found for key 'advanced.throttler.drain-interval'`

throttler.drain-interval is close enough to the property we expose so I think we should be good.