Fixing the bug in the file CassandraCqlClusterFactoryBean #26
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
The max values should be set before setting core values.
Otherwise the core values will be compared with the default max values which is 8.
The stacktrace as below
Caused by: java.lang.IllegalArgumentException: Core connections for LOCAL hosts must be less than max (100 > 8)
at com.datastax.driver.core.PoolingOptions.checkConnectionsPerHostOrder(PoolingOptions.java:323)
at com.datastax.driver.core.PoolingOptions.setCoreConnectionsPerHost(PoolingOptions.java:203)
at org.springframework.cassandra.config.PoolingOptionsFactoryBean.afterPropertiesSet(PoolingOptionsFactoryBean.java:70)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
... 19 more
Also when modifying min & max simultaneous connections
Caused by: java.lang.IllegalArgumentException: Min simultaneous requests per connection for LOCAL hosts must be less than max (110 > 100)
at com.datastax.driver.core.PoolingOptions.checkRequestsPerConnectionOrder(PoolingOptions.java:317)
at com.datastax.driver.core.PoolingOptions.setMinSimultaneousRequestsPerConnectionThreshold(PoolingOptions.java:118)
at org.springframework.cassandra.config.PoolingOptionsFactoryBean.afterPropertiesSet(PoolingOptionsFactoryBean.java:62)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
... 19 more