-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Sumit opened DATACASS-176 and commented
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
I have provided the pull request for the fix
#26
Affects: 1.0.4 (Dijkstra SR4), 1.1 GA (Evans), 1.2 M1 (Fowler)
Referenced from: commits c8604af, 8a821a2, f304686, b560ce2
Backported to: 1.1.2 (Evans SR2)