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/07/20 10:31:19 UTC

[GitHub] [shardingsphere] dachuan9e opened a new issue #11416: The same datasource pool will be opened twice when proxy start

dachuan9e opened a new issue #11416:
URL: https://github.com/apache/shardingsphere/issues/11416


   [INFO ] 2021-07-20 18:26:57.981 [main] com.zaxxer.hikari.HikariDataSource - sharding_db/ds_1 - Starting...
   [INFO ] 2021-07-20 18:27:08.017 [main] com.zaxxer.hikari.HikariDataSource - sharding_db/ds_1 - Start completed.
   [INFO ] 2021-07-20 18:27:08.017 [main] com.zaxxer.hikari.HikariDataSource - sharding_db/ds_1 - Starting...
   [INFO ] 2021-07-20 18:27:18.050 [main] com.zaxxer.hikari.HikariDataSource - sharding_db/ds_1 - Start completed.
   [INFO ] 2021-07-20 18:27:18.050 [main] com.zaxxer.hikari.HikariDataSource - sharding_db/ds_1 - Shutdown initiated...
   [INFO ] 2021-07-20 18:27:18.051 [main] com.zaxxer.hikari.HikariDataSource - sharding_db/ds_1 - Shutdown completed.


-- 
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] TeslaCN closed issue #11416: The same datasource pool will be opened twice when proxy start

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #11416:
URL: https://github.com/apache/shardingsphere/issues/11416


   


-- 
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] TeslaCN closed issue #11416: The same datasource pool will be opened twice when proxy start

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #11416:
URL: https://github.com/apache/shardingsphere/issues/11416


   


-- 
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] dachuan9e commented on issue #11416: The same datasource pool will be opened twice when proxy start

Posted by GitBox <gi...@apache.org>.
dachuan9e commented on issue #11416:
URL: https://github.com/apache/shardingsphere/issues/11416#issuecomment-883954310


   Not this.  Here it create datasource using these codes.  I will fixed. And also here is another problem that the datasource hasn't specific pool name.
   
   private static Map<String, DataSource> createDataSources(final String schemaName, final Map<String, DataSourceParameter> dataSourceParameters) {
           Map<String, DataSource> result = new LinkedHashMap<>(dataSourceParameters.size(), 1);
           for (Entry<String, DataSourceParameter> entry : dataSourceParameters.entrySet()) {
               DataSource dataSource = JDBCRawBackendDataSourceFactory.getInstance().build(schemaName + "/" + entry.getKey(), entry.getValue());
               if (null != dataSource) {
                   result.put(entry.getKey(), dataSource);
               }
           }
           return result;
       }
   
       public DataSource build(final String dataSourceName, final DataSourceParameter dataSourceParameter) {
           HikariConfig config = new HikariConfig();
           .......
           DataSource result;
           try {
               result = new HikariDataSource(config);


-- 
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] dachuan9e edited a comment on issue #11416: The same datasource pool will be opened twice when proxy start

Posted by GitBox <gi...@apache.org>.
dachuan9e edited a comment on issue #11416:
URL: https://github.com/apache/shardingsphere/issues/11416#issuecomment-883954310


   Not this.  Here it create datasource using these codes.  I will fixed. And also here is another problem that the datasource hasn't specific pool name.
   
   AbstractBootstrapInitializer
   ```java
        private static Map<String, DataSource> createDataSources(final String schemaName, final Map<String, DataSourceParameter> dataSourceParameters) {
           Map<String, DataSource> result = new LinkedHashMap<>(dataSourceParameters.size(), 1);
           for (Entry<String, DataSourceParameter> entry : dataSourceParameters.entrySet()) {
               DataSource dataSource = JDBCRawBackendDataSourceFactory.getInstance().build(schemaName + "/" + entry.getKey(), entry.getValue());
               if (null != dataSource) {
                   result.put(entry.getKey(), dataSource);
               }
   ```
   
   JDBCRawBackendDataSourceFactory
   ```java
       public DataSource build(final String dataSourceName, final DataSourceParameter dataSourceParameter) {
           HikariConfig config = new HikariConfig();
           .......
           DataSource result;
           try {
               result = new HikariDataSource(config);
   ```


-- 
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] TeslaCN commented on issue #11416: The same datasource pool will be opened twice when proxy start

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #11416:
URL: https://github.com/apache/shardingsphere/issues/11416#issuecomment-883934057


   This may be related to `org.apache.shardingsphere.proxy.backend.communication.jdbc.datasource.decorator.HikariJDBCParameterDecorator`.


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