You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/04 12:34:55 UTC

[GitHub] [shardingsphere] sandynz opened a new pull request #14515: Improve JdbcUrlParser.appendQueryProperties when jdbc url property key duplicated

sandynz opened a new pull request #14515:
URL: https://github.com/apache/shardingsphere/pull/14515


   
   Changes proposed in this pull request:
   - Improve JdbcUrlParser.appendQueryProperties when jdbc url property key duplicated. Support 2 scenarios: 1) new jdbc url property key doesn't exist in current query properties, 2) if jdbc url property key exists, then merge conflicted properties.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] sandynz commented on pull request #14515: Improve JdbcUrlParser.appendQueryProperties when jdbc url property key duplicated

Posted by GitBox <gi...@apache.org>.
sandynz commented on pull request #14515:
URL: https://github.com/apache/shardingsphere/pull/14515#issuecomment-1004776690


   There's exception thrown when starting scaling job, e.g.
   `useSSL` duplicated:
   ```
   [elasticjob-1494724844918228-2] o.a.s.e.e.h.g.LogJobErrorHandler - Job '1494724844918228' exception occur in job processing
   java.lang.IllegalArgumentException: Duplicate key [useSSL] found.
   	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:217)
   	at com.google.common.base.Splitter$MapSplitter.split(Splitter.java:524)
   	at org.apache.shardingsphere.infra.config.datasource.url.JdbcUrlParser.parseQueryProperties(JdbcUrlParser.java:91)
   	at org.apache.shardingsphere.infra.config.datasource.url.JdbcUrlParser.parse(JdbcUrlParser.java:60)
   	at org.apache.shardingsphere.infra.config.datasource.pool.creator.DataSourceReflection.addDefaultDataSourceProperties(DataSourceReflection.java:153)
   	at org.apache.shardingsphere.infra.config.datasource.pool.creator.DataSourcePoolCreator.createDataSource(DataSourcePoolCreator.java:82)
   	at org.apache.shardingsphere.infra.config.datasource.pool.creator.DataSourcePoolCreatorUtil.getDataSource(DataSourcePoolCreatorUtil.java:43)
   ```
   
   `rewriteBatchedStatements` duplicated:
   ```
   Caused by: java.lang.IllegalArgumentException: Duplicate key [rewriteBatchedStatements] found.
   	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:217)
   	at com.google.common.base.Splitter$MapSplitter.split(Splitter.java:524)
   	at org.apache.shardingsphere.infra.config.datasource.url.JdbcUrlParser.parseQueryProperties(JdbcUrlParser.java:91)
   	at org.apache.shardingsphere.infra.config.datasource.url.JdbcUrlParser.parse(JdbcUrlParser.java:60)
   	at org.apache.shardingsphere.infra.config.datasource.pool.creator.DataSourceReflection.addDefaultDataSourceProperties(DataSourceReflection.java:153)
   	at org.apache.shardingsphere.infra.config.datasource.pool.creator.DataSourcePoolCreator.createDataSource(DataSourcePoolCreator.java:82)
   	at org.apache.shardingsphere.infra.config.datasource.pool.creator.DataSourcePoolCreatorUtil.getDataSource(DataSourcePoolCreatorUtil.java:43)
   ```
   
   `/scaling/jobId/config` generation depends on `PipelineDataSourceConfiguration.appendJDBCQueryProperties`, which depends on `new JdbcUrlParser().appendQueryProperties`.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #14515: Improve JdbcUrlParser.appendQueryProperties when jdbc url property key duplicated

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #14515:
URL: https://github.com/apache/shardingsphere/pull/14515


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org