You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "yanglei (Jira)" <ji...@apache.org> on 2021/11/16 07:15:00 UTC

[jira] [Created] (IOTDB-2018) Query dataset memory leak on server caused by python client

yanglei created IOTDB-2018:
------------------------------

             Summary: Query dataset memory leak on server caused by python client
                 Key: IOTDB-2018
                 URL: https://issues.apache.org/jira/browse/IOTDB-2018
             Project: Apache IoTDB
          Issue Type: Bug
          Components: Client/Python
            Reporter: yanglei


version: 0.12.2 & 0.13.0-SNAPSHOT
def close_operation_handle(self) is not worked as expected.
I'm testing the performance of java client and python client. During the test, I found that Python client will lead to memory leakage of sever, which leads to continuous query performance degradation when using Python client for continuous query operations. 
My python client test code is:
```
for i in range(0, times):
        session_dataset = session.execute_query_statement(sql)
        while session_dataset.has_next():
            session_dataset.next()
        session_dataset.close_operation_handle()
```
My java client test code is:
```
for (int i = 0; i < times; i++) {
    SessionDataSet sessionDataSet = session.executeQueryStatement(sql);
    while (sessionDataSet.hasNext()) {
        sessionDataSet.next();
    }
    sessionDataSet.closeOperationHandle();
}
```
After continuous query operation with Python client, the memory usage of the server is:
```
2021-11-15 12:26:15,177 [Thread-0] INFO  o.a.i.d.s.IoTDBShutdownHook:33 - IoTDB exits. Jvm memory usage: 1 GB 23 MB 111 KB 888 B 
```
After continuous query operation with Java client, the memory usage of the server is:
```
2021-11-15 08:38:42,582 [Thread-0] INFO  o.a.i.d.s.IoTDBShutdownHook:33 - IoTDB exits. Jvm memory usage: 0 GB 303 MB 846 KB 952 B 
```



--
This message was sent by Atlassian Jira
(v8.20.1#820001)