Skip to content

Align default values for Cassandra's throttling properties #25149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
snicoll opened this issue Feb 9, 2021 · 2 comments
Closed

Align default values for Cassandra's throttling properties #25149

snicoll opened this issue Feb 9, 2021 · 2 comments
Assignees
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Feb 9, 2021

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.

@snicoll snicoll added the type: bug A general bug label Feb 9, 2021
@snicoll snicoll added this to the 2.5.x milestone Feb 9, 2021
@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Feb 9, 2021
@snicoll
Copy link
Member Author

snicoll commented Feb 9, 2021

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 #25130 for more details.

@philwebb philwebb added type: enhancement A general enhancement and removed for: team-attention An issue we'd like other members of the team to review type: bug A general bug labels Feb 10, 2021
@snicoll snicoll added the status: noteworthy A noteworthy issue to call out in the release notes label Feb 11, 2021
@snicoll snicoll self-assigned this Feb 11, 2021
@snicoll snicoll changed the title Cassandra's throttling properties have inconsistent default Align default values for Cassandra's throttling properties Feb 14, 2021
@snicoll
Copy link
Member Author

snicoll commented Feb 16, 2021

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.

@snicoll snicoll modified the milestones: 2.5.x, 2.5.0-M2 Feb 16, 2021
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
Prior to this commit, ExchangeStrategies custom codec's reader and
writer were not registered due to a bug in BaseCodecConfigurer.

This commit fixes this by correcting the implementation of the
DefaultCustomCodecs constructor used within BaseCodecConfigurer.

Closes spring-projectsgh-25149
humaolin pushed a commit to humaolin/spring-boot that referenced this issue May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants