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 2021/12/01 08:53:48 UTC

[GitHub] [shardingsphere] sandynz opened a new pull request #13883: Ignore DataSource property name which value is null when building DataSourceConfiguration from DataSource

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


   Fixes #13632.
   
   Changes proposed in this pull request:
   - Ignore DataSource property name which value is null. Make sure keys like `driverClassName: null` won't be persisted into `/metadata/sharding_db/dataSources`, it will cause NullPointerException from `HikariConfig.setDriverClassName` when initializing HikariDataSource.
   


-- 
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 #13883: Ignore DataSource property name which value is null when building DataSourceConfiguration from DataSource

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


   `/metadata/sharding_db/dataSources` previous value:
   ```
   ds_0:
     schema: null
     transactionIsolation: null
     initializationFailTimeout: 1
     validationTimeout: 5000
     catalog: null
     maxLifetime: 1800000
     leakDetectionThreshold: 0
     connectionInitSql: null
     minimumIdle: 1
     password: root
     dataSourceJNDI: null
     connectionTestQuery: null
     idleTimeout: 60000
     driverClassName: null
     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_ds_0?serverTimezone=UTC&useSSL=false
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     maximumPoolSize: 50
     connectionTimeout: 30000
     username: root
     poolName: HikariPool-1
   ds_1:
     schema: null
     transactionIsolation: null
     initializationFailTimeout: 1
     validationTimeout: 5000
     catalog: null
     maxLifetime: 1800000
     leakDetectionThreshold: 0
     connectionInitSql: null
     minimumIdle: 1
     password: root
     dataSourceJNDI: null
     connectionTestQuery: null
     idleTimeout: 60000
     driverClassName: null
     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_ds_1?serverTimezone=UTC&useSSL=false
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     maximumPoolSize: 50
     connectionTimeout: 30000
     username: root
     poolName: HikariPool-2
   ```
   
   `/metadata/sharding_db/dataSources` new value with new code:
   ```
   ds_0:
     initializationFailTimeout: 1
     validationTimeout: 5000
     maxLifetime: 1800000
     leakDetectionThreshold: 0
     minimumIdle: 1
     password: root
     idleTimeout: 60000
     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_ds_0?serverTimezone=UTC&useSSL=false
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     maximumPoolSize: 50
     connectionTimeout: 30000
     username: root
     poolName: HikariPool-1
   ds_1:
     initializationFailTimeout: 1
     validationTimeout: 5000
     maxLifetime: 1800000
     leakDetectionThreshold: 0
     minimumIdle: 1
     password: root
     idleTimeout: 60000
     jdbcUrl: jdbc:mysql://127.0.0.1:3306/scaling_ds_1?serverTimezone=UTC&useSSL=false
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     maximumPoolSize: 50
     connectionTimeout: 30000
     username: root
     poolName: HikariPool-2
   ```
   
   
   


-- 
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] menghaoranss merged pull request #13883: Ignore DataSource property name which value is null when building DataSourceConfiguration from DataSource

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


   


-- 
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