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 2021/02/04 08:07:56 UTC

[GitHub] [iotdb] qiaojialin opened a new issue #2625: Reusing IoTDBConnect to create IoTDBStatement will cause OOM

qiaojialin opened a new issue #2625:
URL: https://github.com/apache/iotdb/issues/2625


   version 0.11.2:
   
   When reusing IoTDBConnection to create IoTDBStatement. The  statement set in sessionId2statementId2 is never removed unless the connection is closed.
   
   This will cause OOM if using a Connection is used for too long time.
   
   Reproduce: This may take a long time to OOM...
   
   ```
   package org.apache.iotdb;
   import org.apache.iotdb.jdbc.IoTDBSQLException;
   import java.sql.Connection;
   import java.sql.DriverManager;
   import java.sql.SQLException;
   import java.sql.Statement;
   
   public class JDBCExample {
   
     public static void main(String[] args) throws ClassNotFoundException, SQLException {
       Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
       try (Connection connection = DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root");
         ) {
         while (true) {
           Statement statement = connection.createStatement();
           statement.close();
         }
       } catch (IoTDBSQLException e) {
         System.out.println(e.getMessage());
       }
     }
   
   }
   ```
   


----------------------------------------------------------------
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] [iotdb] qiaojialin closed issue #2625: Reusing IoTDBConnect to create IoTDBStatement will cause OOM

Posted by GitBox <gi...@apache.org>.
qiaojialin closed issue #2625:
URL: https://github.com/apache/iotdb/issues/2625


   


----------------------------------------------------------------
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] [iotdb] qiaojialin closed issue #2625: Reusing IoTDBConnect to create IoTDBStatement will cause OOM

Posted by GitBox <gi...@apache.org>.
qiaojialin closed issue #2625:
URL: https://github.com/apache/iotdb/issues/2625


   


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