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 07:39:39 UTC

[GitHub] [iotdb] qiaojialin opened a new issue #2624: Reusing IoTDBStatement to do queries will cause OOM

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


   version 0.11.2:
   
   When reusing IoTDBStatement to do queries. The Set<queryId> in statementId2QueryId is never removed unless the statment is clsoed.
   
   This will cause OOM if using a Statement 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.ResultSet;
   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");
         Statement statement = connection.createStatement()) {
   
         while (true) {
           //set JDBC fetchSize
           ResultSet resultSet = statement.executeQuery("select * from root");
           resultSet.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 #2624: Reusing IoTDBStatement to do queries will cause OOM

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


   


----------------------------------------------------------------
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 #2624: Reusing IoTDBStatement to do queries will cause OOM

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


   


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