dachuan9e opened a new issue #11462:
URL: https://github.com/apache/shardingsphere/issues/11462
# Input
ADD RESOURCE resource_3 (
URL="jdbc:mysql://localhost:3306/db3?serverTimezone=UTC&useSSL=false",
USER=root,
PASSWORD=123456,
PROPERTIES("maxPoolSize"=10)
);
# Steps
- Start proxy
- Execute the distSQL above
- Stop proxy and restart
- Proxy start fail
# Exception's log
Exception in thread "main" java.lang.IllegalArgumentException: Can not set
int field
org.apache.shardingsphere.infra.config.datasource.DataSourceParameter.maxPoolSize
to null value
at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at
sun.reflect.UnsafeIntegerFieldAccessorImpl.set(UnsafeIntegerFieldAccessorImpl.java:98)
at java.lang.reflect.Field.set(Field.java:764)
at
org.apache.shardingsphere.proxy.config.util.DataSourceParameterConverter.createDataSourceParameter(DataSourceParameterConverter.java:69)
at
org.apache.shardingsphere.proxy.config.util.DataSourceParameterConverter.lambda$getDataSourceParameterMap$0(DataSourceParameterConverter.java:48)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at
org.apache.shardingsphere.proxy.config.util.DataSourceParameterConverter.getDataSourceParameterMap(DataSourceParameterConverter.java:48)
at
org.apache.shardingsphere.proxy.initializer.impl.GovernanceBootstrapInitializer.lambda$loadDataSourceParametersMap$3(GovernanceBootstrapInitializer.java:126)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at
org.apache.shardingsphere.proxy.initializer.impl.GovernanceBootstrapInitializer.loadDataSourceParametersMap(GovernanceBootstrapInitializer.java:125)
at
org.apache.shardingsphere.proxy.initializer.impl.GovernanceBootstrapInitializer.loadProxyConfiguration(GovernanceBootstrapInitializer.java:115)
at
org.apache.shardingsphere.proxy.initializer.impl.GovernanceBootstrapInitializer.getProxyConfiguration(GovernanceBootstrapInitializer.java:73)
at
org.apache.shardingsphere.proxy.initializer.impl.AbstractBootstrapInitializer.init(AbstractBootstrapInitializer.java:61)
at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:48)
# Root cause analysis
Data in zookeeper after executing the distSQL. Pay attention to the
maxPoolSize attribution. It has a string value not a integer. It makes the
issue happened.
resource_3:
minimumIdle: 1
password: '123456'
idleTimeout: 60000
jdbcUrl: jdbc:mysql://localhost:3306/db3?serverTimezone=UTC&useSSL=false
readOnly: false
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
maximumPoolSize: 50
connectionTimeout: 30000
maxPoolSize: '10'
maxLifetime: 1800000
username: root
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]