-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Expose configuration property for Cassandra's control queries timeout #24189
Comments
@logicatmidod all those properties with The property that you're looking to tune for the exception above is If you want support, please take the time to build a small sample that we can run to reproduce the problem. You can do so by attaching a zip to this issue or sharing a link to a GitHub repository. |
I solved this issue by setting advanced.control-connection.timeout by setting manually at Datastax Driver Option this property was not exposed at spring boot side. |
Thanks for the feedback. Timeout for control queries, I see. This is worth exposing I guess although it's not immediately obvious from the exception you've shared that |
Hi @logicatmidod , I'm facing the same issue when running migrations (we use https://github.com/patka/cassandra-migration) - the issue is really weird, it seems to occur randomly in PRD installations (either low-data-load or heavy-data-load) and I cannot replicate locally). Could you please elaborate how did you actually set the Thanks in advance for your response and help |
@smakalias this is described in the documentation, something like: @Bean
DriverConfigLoaderBuilderCustomizer cassandraDriverCustomizer() {
return (builder) -> builder.withDuration(
DefaultDriverOption.CONTROL_CONNECTION_TIMEOUT, Duration.ofSeconds(10));
} Spring Boot is not going to override anything you've specified yourself. You can also inject the |
Sorry for missing the debate. I think it makes sense to expose the control connection timeout, although it remains something of an advanced setting. @snicoll I would however raise your attention to the timeout defaults used in Spring Boot: Having such defaults hardcoded here is worrisome because they could get out of sync of the actual driver defaults. In fact it happened already: since driver 4.8 the init query timeout was raised to 5 seconds, see JAVA-2841 for details. If it is possible to set the defaults by reading the default driver configuration, that would be better. Hint: as I said elsewhere, the |
Thanks for brining the misalignment to our attention, @adutra.
We can't do this without losing the default values in our configuration property metadata. This metadata is used by IDEs to provide auto-completion and property descriptions when editing application.properties and application.yaml files. I've opened #24965 to add some tests to verify that things are in sync. |
Hello, I know this thread is closed, but I don't know if I should create a separate thread to discuss the same problem. I used below configuration properties below -
Below is the configuration I used as suggested in the post -
But I still getting the same error I also tried different approached like creating custom
// And provided my own SessionBuilder Configurer like below
It didn't work same error. Also, I excluded the Cassandra auto-configuration classes like suggested here on StackOverflow I also tried to customize custom session builder like below to see if that can work -
Still no luck. Not only that I also added application.conf file as DataStax documentation suggested putting that on the classpath, even though that file is getting parsed (after making the syntactical mistake I got to know that it is being read). It didn't work.
I also switched my spring boot version to 2.5.0.M3 to see property files works it does not. I spent 4-5 days on it. Any help would be appreciated. I have pushed my project to my GitHub account. Please take a look here. Thank you in advance. |
@rajeevshukla Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or open a new issue if you feel this is a genuine bug. |
@wilkinsona Thank you. I have posted the same question on StackOverflow here. I feel like this is a genuine bug as application properties are still not in effect after upgrading my version to spring boot 2.5.0.M3. I still see values are not being overridden. But I would do that if don't get any response from stackoverflow. |
While trying to use spring-data-cassandra with 2.3.5.RELEASE when trying to connect to cassandra getting below error
I have configured these properties still don't know why timeout is considered to be PT2S
Also tried to use DriverConfigLoaderBuilderCustomizer as specified here https://stackoverflow.com/questions/61332483/spring-boot-2-3-0-m4-cassandra-and-ssl but not able to overwrite the time
but cant see DriverConfigLoaderBuilderCustomizer Bean being invoked at all any config I am missing that needs to be done.
The text was updated successfully, but these errors were encountered: