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 2020/08/04 04:23:26 UTC

[GitHub] [shardingsphere] cmonkey opened a new issue #6606: Operation not allowed after ResultSet closed

cmonkey opened a new issue #6606:
URL: https://github.com/apache/shardingsphere/issues/6606


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   upstream master commit 050f5c0ab329c5181700d900d990cfb02558ba45
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   no error
   ### Actual behavior
   [ERROR] 12:15:52.262 [ShardingSphere-Command-8] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.sql.SQLException: Operation not allowed after ResultSet closed
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
   	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.ResultSetImpl.checkClosed(ResultSetImpl.java:743)
   	at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:787)
   	at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4419)
   	at com.zaxxer.hikari.pool.HikariProxyResultSet.getObject(HikariProxyResultSet.java)
   	at org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.queryresult.StreamQueryResult.getValue(StreamQueryResult.java:94)
   	at org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult.getValue(StreamMergedResult.java:47)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.getQueryData(JDBCDatabaseCommunicationEngine.java:177)
   	at org.apache.shardingsphere.proxy.backend.text.query.QueryBackendHandler.getQueryData(QueryBackendHandler.java:62)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.getQueryData(MySQLComQueryPacketExecutor.java:140)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.getQueryData(MySQLComQueryPacketExecutor.java:55)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.writeQueryData(MySQLCommandExecuteEngine.java:89)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:111)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:80)
   	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)
   
   [ERROR] 12:15:59.657 [ShardingSphere-Command-4] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.util.ConcurrentModificationException: null
   	at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
   	at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:747)
   	at com.google.common.collect.AbstractMapBasedMultimap.clear(AbstractMapBasedMultimap.java:288)
   	at com.google.common.collect.LinkedHashMultimap.clear(LinkedHashMultimap.java:530)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection.releaseConnections(BackendConnection.java:322)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection.close(BackendConnection.java:276)
   	at org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection.close(BackendConnection.java:261)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:83)
   	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)
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   test sql : select * from order limit 0, 10
   route: all route 
   test tootl : tsung 
   ### Example codes for reproduce this issue (such as a github link).
   


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   @cmonkey I'd like to make these questions more clear:
   1. Would the Exception can be reproduced each time when execute SQL "select * from order limit 0, 10"? (Yes or No)
   (The first time execute this SQL burst an exception, and the following every time burst the exception, yes or no?)
   2. Do the test cases contain any transaction? (Do you really use transaction? How to use it, please provide the process. It may be configed in tsung, or sent an SQL like 'begin'/'commit')
   3. Please set sql.show: true and show me the full log. (I mean put the full log right here, via raw text or attachment.)


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

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



[GitHub] [shardingsphere] cmonkey commented on issue #6606: Operation not allowed after ResultSet closed

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


   config-sharding.yaml 
   ```yaml
   schemaName: sharding_db
   
   dataSourceCommon:
     username: root
     password: root
     connectionTimeoutMilliseconds: 30000
     idleTimeoutMilliseconds: 60000
     maxLifetimeMilliseconds: 1800000
     maxPoolSize: 50
     minPoolSize: 1
     maintenanceIntervalMilliseconds: 30000
   
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_1:
       url: jdbc:mysql://127.0.0.1:3307/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_2:
       url: jdbc:mysql://127.0.0.1:3308/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_3:
       url: jdbc:mysql://127.0.0.1:3309/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_4:
       url: jdbc:mysql://127.0.0.1:3310/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_5:
       url: jdbc:mysql://127.0.0.1:3311/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_6:
       url: jdbc:mysql://127.0.0.1:3312/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_7:
       url: jdbc:mysql://127.0.0.1:3313/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_8:
       url: jdbc:mysql://127.0.0.1:3314/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_9:
       url: jdbc:mysql://127.0.0.1:3315/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_10:
       url: jdbc:mysql://127.0.0.1:3316/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_11:
       url: jdbc:mysql://127.0.0.1:3317/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_12:
       url: jdbc:mysql://127.0.0.1:3318/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_13:
       url: jdbc:mysql://127.0.0.1:3319/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_14:
       url: jdbc:mysql://127.0.0.1:3320/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_30:
       url: jdbc:mysql://127.0.0.1:3330/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_40:
       url: jdbc:mysql://127.0.0.1:3340/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_50:
       url: jdbc:mysql://127.0.0.1:3350/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
     ds_60:
       url: jdbc:mysql://127.0.0.1:3360/product?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true
   
   
   rules:
   - !SHARDING
     tables:
       order:
         actualDataNodes: ds_${[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,30,40,50,60]}.order
         databaseStrategy:
           complex:
             shardingColumns: instance_pk
             shardingAlgorithmName: order_detail_complex
         keyGenerateStrategy:
           column: ID
           keyGeneratorName: snowflake
   
     defaultTableStrategy:
       none:
   
     shardingAlgorithms:
       order_detail_complex:
         type: business
         props:
           dsList: ds_0,ds_1,ds_2,ds_3,ds_4,ds_5,ds_6,ds_7,ds_8,ds_9,ds_10,ds_11,ds_12,ds_13,ds_14,ds_30,ds_40,ds_50,ds_60
   
     keyGenerators:
         snowflake:
           type: SNOWFLAKE
           props:
               worker.id: 123
   ```
   business algorithm return targetNames 
   
   server.yaml 
   ```yaml
   authentication:
     users:
       root:
         password: root
       sharding:
         password: sharding
         authorizedSchemas: sharding_db
   
   props:
     max.connections.size.per.query: 1
     acceptor.size: 16  # The default value is available processors count * 2.
     executor.size: 16  # Infinite by default.
     proxy.frontend.flush.threshold: 128  # The default value is 128.
       # LOCAL: Proxy will run with LOCAL transaction.
       # XA: Proxy will run with XA transaction.
       # BASE: Proxy will run with B.A.S.E transaction.
     proxy.transaction.type: LOCAL
     proxy.opentracing.enabled: false
     proxy.cluster.enabled: false
     proxy.hint.enabled: false
     query.with.cipher.column: true
     sql.show: true
     allow.range.query.with.inline.sharding: false
     check.table.metadata.enabled: false
   ```
   ```properties
   jdk version :
   openjdk version "1.8.0_262"
   OpenJDK Runtime Environment (build 1.8.0_262-b10)
   OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)
   
   jvm args: default 
   os version : Arch Linux x86_64
   kernel version: 5.7.12-arch1-1
   Mysql version: 5.7.29
   Mysql Connector/J version: 8.0.19
   ```


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

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



[GitHub] [shardingsphere] tuohai666 closed issue #6606: Operation not allowed after ResultSet closed

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


   


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

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



[GitHub] [shardingsphere] cmonkey commented on issue #6606: Operation not allowed after ResultSet closed

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


   1. separate test case "select * from order limit 0, 10"
   2. local transaction to proxy, the default transaction database
   3. log level error
   


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   Hi @cmonkey , please also provide Connector/J version and MySQL server version.


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

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



[GitHub] [shardingsphere] cmonkey commented on issue #6606: Operation not allowed after ResultSet closed

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


   respectively test the mysql connector/java version 5.1.47,8.0.19,zero difference
   
   


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

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



[GitHub] [shardingsphere] tuohai666 edited a comment on issue #6606: Operation not allowed after ResultSet closed

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


   You can truncate the log around Exceptions (+-500 lines).


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   Hi @cmonkey , what's config-*.yaml and server.yaml ?


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   Expired.


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

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



[GitHub] [shardingsphere] cmonkey commented on issue #6606: Operation not allowed after ResultSet closed

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


   1. No 
   2. respectively using tsung, jmeter test, the test result are same
   he first test is normal, on the second test error


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   @cmonkey 
   
   > Please set sql.show: true and show me the full log. (I mean put the full log right here, via raw text or attachment.)
   
   The full log means logs generated by ShardingSphere-Proxy. Please upload the logs to this issue.


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   Get it. Three more questions:
   1. Would the Exception can be reproduced each time when execute SQL "select * from order limit 0, 10"?
   2. Do the test cases contain any transaction?
   3. Please set sql.show: true and show me the full log.


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   You can truncate the log around Exceptions.


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

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



[GitHub] [shardingsphere] tuohai666 commented on issue #6606: Operation not allowed after ResultSet closed

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


   @cmonkey Any update?


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

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



[GitHub] [shardingsphere] cmonkey commented on issue #6606: Operation not allowed after ResultSet closed

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


   ![image](https://user-images.githubusercontent.com/664050/89376164-da9f7f80-d721-11ea-8125-1439cf62b2fd.png)
   file is too large


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

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