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/10/22 02:00:07 UTC

[GitHub] [shardingsphere] lwclover opened a new issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

lwclover opened a new issue #13213:
URL: https://github.com/apache/shardingsphere/issues/13213


   Exception occurs when Changing /meta/scheamName/dataSources/ config in registry. 
   The reason is the eventbus consumes DataSourceChangedEvent closing changedDataSource.
   So proxy does not have the ability to gracefully modify data source configurations.
   
   `[ERROR] 2021-10-22 09:51:28.610 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
   	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
   	at com.mysql.jdbc.Util.getInstance(Util.java:408)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
   	at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1192)
   	at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1187)
   	at com.mysql.jdbc.ConnectionImpl.getMetaData(ConnectionImpl.java:2901)
   	at com.mysql.jdbc.ConnectionImpl.getMetaData(ConnectionImpl.java:2896)
   	at com.zaxxer.hikari.pool.ProxyConnection.getMetaData(ProxyConnection.java:359)
   	at com.zaxxer.hikari.pool.HikariProxyConnection.getMetaData(HikariProxyConnection.java)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:80)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:64)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:101)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:97)
   	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:82)
   	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:65)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.executor.ProxyJDBCExecutor.execute(ProxyJDBCExecutor.java:71)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.useDriverToExecute(ProxySQLExecutor.java:183)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:136)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:125)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.doExecute(ProxyLockEngine.java:103)
   	at org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.execute(ProxyLockEngine.java:81)
   	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:126)
   	at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:99)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)`
   
   
   


-- 
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] lwclover edited a comment on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   > If users change database host, port or dbName in /meta/scheamName/dataSources/, what will you do?
   
   Wait connection returns to datasource, And then close it. I have already fix it.
   I will submit a pr.


-- 
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] RaigorJiang commented on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   > Wait connection returns to datasource, And then close it. I have already fix it. I will submit a pr.
   
   Sounds great, looking forward to it.


-- 
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] lwclover commented on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   This is not a question. The bug need fix @RaigorJiang 


-- 
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] lanchengx commented on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   Hi @lwclover  thanks for you feedback,  
   `ALTER RESOURCE will switch the connection pool. This operation may affect the ongoing business, please use it with caution` is prompted in the [document](https://shardingsphere.apache.org/document/current/en/concepts/distsql/syntax/rdl/rdl-resource/) ,
   
   If you have a good idea, we can discuss it.
   
   


-- 
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] lwclover edited a comment on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   > If users change database host, port or dbName in /meta/scheamName/dataSources/, what will you do?
   
   Wait connection return to datasource, And then close the it. I have already fix it.
   I will submit a pr.


-- 
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] RaigorJiang commented on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   If users change database host, port or dbName in /meta/scheamName/dataSources/, what will you do?


-- 
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 closed issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   


-- 
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] lwclover edited a comment on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   This is not a question. The bug need fix @RaigorJiang, I will do it.


-- 
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] lwclover commented on issue #13213: Exception occurs when Changing /meta/scheamName/dataSources/ config in registry.

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


   > If users change database host, port or dbName in /meta/scheamName/dataSources/, what will you do?
   
   Wait connection return to datasource, And then close the it. I have already fix it.


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