You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/08/10 16:38:09 UTC

[GitHub] [incubator-iotdb] jixuan1989 opened a new pull request #1610: [IOTDB-832] fix reconnection failure bug in sessionPool

jixuan1989 opened a new pull request #1610:
URL: https://github.com/apache/incubator-iotdb/pull/1610


   SessionPool can reconnect the server automatically if the connection is broken.
   
   However, if the server is down and therefore session pool reconnects failed, the pool still considers the size of session connections that it owns should be +1, which leads to no more sessions can be created.
   
    
   
   // Some comments here
   
   23:41:27.902 [Thread-1] DEBUG org.apache.iotdb.session.pool.SessionPool - Create a new Session 127.0.0.1, 6667, root, root
   23:41:27.902 [Thread-0] DEBUG org.apache.iotdb.session.pool.SessionPool - Create a new Session 127.0.0.1, 6667, root, root
   23:41:27.902 [Thread-2] DEBUG org.apache.iotdb.session.pool.SessionPool - Create a new Session 127.0.0.1, 6667, root, root
   23:41:32.923 [Thread-1] DEBUG org.apache.iotdb.session.pool.SessionPool - Remove a broken Session 127.0.0.1, 6667, root, root
   23:41:32.923 [Thread-2] WARN org.apache.thrift.transport.TIOStreamTransport - Error closing output stream.
   java.net.SocketException: Socket closed
   	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
   	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
   	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
   	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
   	at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
   	at org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:108)
   	at org.apache.thrift.transport.TSocket.close(TSocket.java:235)
   	at org.apache.thrift.transport.TFastFramedTransport.close(TFastFramedTransport.java:115)
   	at org.apache.iotdb.session.Session.close(Session.java:192)
   	at org.apache.iotdb.session.pool.SessionPool.closeSession(SessionPool.java:215)
   	at org.apache.iotdb.session.pool.SessionPool.cleanSessionAndMayThrowConnectionException(SessionPool.java:223)
   	at org.apache.iotdb.session.pool.SessionPool.insertRecord(SessionPool.java:391)
   	at org.apache.iotdb.SessionPoolExample.lambda$insertRecord$0(SessionPoolExample.java:74)
   	at java.lang.Thread.run(Thread.java:748)
   23:41:32.923 [Thread-0] DEBUG org.apache.iotdb.session.pool.SessionPool - Remove a broken Session 127.0.0.1, 6667, root, root
   23:41:32.923 [Thread-0] DEBUG org.apache.iotdb.session.pool.SessionPool - Create a new Session 127.0.0.1, 6667, root, root
   23:41:32.923 [Thread-2] DEBUG org.apache.iotdb.session.pool.SessionPool - Remove a broken Session 127.0.0.1, 6667, root, root
   23:41:32.923 [Thread-2] DEBUG org.apache.iotdb.session.pool.SessionPool - Create a new Session 127.0.0.1, 6667, root, root
   23:41:32.924 [Thread-1] DEBUG org.apache.iotdb.session.pool.SessionPool - Create a new Session 127.0.0.1, 6667, root, root
   org.apache.iotdb.rpc.IoTDBConnectionException: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
   	at org.apache.iotdb.session.Session.open(Session.java:130)
   	at org.apache.iotdb.session.Session.open(Session.java:115)
   	at org.apache.iotdb.session.pool.SessionPool.getSession(SessionPool.java:144)
   	at org.apache.iotdb.session.pool.SessionPool.insertRecord(SessionPool.java:384)
   	at org.apache.iotdb.SessionPoolExample.lambda$insertRecord$0(SessionPoolExample.java:74)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
   	at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
   	at org.apache.thrift.transport.TFastFramedTransport.open(TFastFramedTransport.java:125)
   	at org.apache.iotdb.session.Session.open(Session.java:128)
   	... 5 more
   Caused by: java.net.ConnectException: Connection refused (Connection refused)
   	at java.net.PlainSocketImpl.socketConnect(Native Method)
   	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
   	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
   	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
   	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
   	at java.net.Socket.connect(Socket.java:589)
   	at org.apache.thrift.transport.TSocket.open(TSocket.java:221)
   	... 7 more
   org.apache.iotdb.rpc.IoTDBConnectionException: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
   	at org.apache.iotdb.session.Session.open(Session.java:130)
   	at org.apache.iotdb.session.Session.open(Session.java:115)
   	at org.apache.iotdb.session.pool.SessionPool.getSession(SessionPool.java:144)
   	at org.apache.iotdb.session.pool.SessionPool.insertRecord(SessionPool.java:384)
   	at org.apache.iotdb.SessionPoolExample.lambda$insertRecord$0(SessionPoolExample.java:74)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
   	at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
   	at org.apache.thrift.transport.TFastFramedTransport.open(TFastFramedTransport.java:125)
   	at org.apache.iotdb.session.Session.open(Session.java:128)
   	... 5 more
   Caused by: java.net.ConnectException: Connection refused (Connection refused)
   	at java.net.PlainSocketImpl.socketConnect(Native Method)
   	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
   	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
   	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
   	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
   	at java.net.Socket.connect(Socket.java:589)
   	at org.apache.thrift.transport.TSocket.open(TSocket.java:221)
   	... 7 more
   org.apache.iotdb.rpc.IoTDBConnectionException: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
   	at org.apache.iotdb.session.Session.open(Session.java:130)
   	at org.apache.iotdb.session.Session.open(Session.java:115)
   	at org.apache.iotdb.session.pool.SessionPool.getSession(SessionPool.java:144)
   	at org.apache.iotdb.session.pool.SessionPool.insertRecord(SessionPool.java:384)
   	at org.apache.iotdb.SessionPoolExample.lambda$insertRecord$0(SessionPoolExample.java:74)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
   	at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
   	at org.apache.thrift.transport.TFastFramedTransport.open(TFastFramedTransport.java:125)
   	at org.apache.iotdb.session.Session.open(Session.java:128)
   	... 5 more
   Caused by: java.net.ConnectException: Connection refused (Connection refused)
   	at java.net.PlainSocketImpl.socketConnect(Native Method)
   	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
   	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
   	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
   	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
   	at java.net.Socket.connect(Socket.java:589)
   	at org.apache.thrift.transport.TSocket.open(TSocket.java:221)
   	... 7 more
   23:41:42.946 [Thread-0] WARN org.apache.iotdb.session.pool.SessionPool - the SessionPool has wait for 10 seconds to get a new connection: 127.0.0.1:6667 with root, root
   23:41:42.946 [Thread-0] WARN org.apache.iotdb.session.pool.SessionPool - current occupied size 0, queue size 0, considered size 3 
   org.apache.iotdb.rpc.IoTDBConnectionException: timeout to get a connection from 127.0.0.1:6667
   	at org.apache.iotdb.session.pool.SessionPool.getSession(SessionPool.java:126)
   	at org.apache.iotdb.session.pool.SessionPool.insertRecord(SessionPool.java:384)
   	at org.apache.iotdb.SessionPoolExample.lambda$insertRecord$0(SessionPoolExample.java:74)
   	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.

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



[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1610: [IOTDB-832] fix reconnection failure bug in sessionPool

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #1610:
URL: https://github.com/apache/incubator-iotdb/pull/1610#issuecomment-671706362


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


----------------------------------------------------------------
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] [incubator-iotdb] sonarcloud[bot] commented on pull request #1610: [IOTDB-832] fix reconnection failure bug in sessionPool

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #1610:
URL: https://github.com/apache/incubator-iotdb/pull/1610#issuecomment-671492845


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


----------------------------------------------------------------
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] [incubator-iotdb] qiaojialin merged pull request #1610: [IOTDB-832] fix reconnection failure bug in sessionPool

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #1610:
URL: https://github.com/apache/incubator-iotdb/pull/1610


   


----------------------------------------------------------------
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] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1610: [IOTDB-832] fix reconnection failure bug in sessionPool

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #1610:
URL: https://github.com/apache/incubator-iotdb/pull/1610#issuecomment-671492845


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1610&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1610&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


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