Xiangdong Huang created IOTDB-1007:
--------------------------------------

             Summary: SessionPool logic error if getSession() is calling after 
pool.close() is called 
                 Key: IOTDB-1007
                 URL: https://issues.apache.org/jira/browse/IOTDB-1007
             Project: Apache IoTDB
          Issue Type: Bug
          Components: Client/Java
            Reporter: Xiangdong Huang


Current session Pool has some concurrency problems:

1. 
{code:java}
public static void main() {
    queryByRowRecord(); // this method open a new thread to use session.
    Thread.sleep(1000);
    pool.close(); // this method close pool.
}
{code}

Then the pool will clear all existing sessions, which may lead to some leakage 
and deadlock.

2. `notifyAll()` is not called, which will lead to `wait(1000)` waits too long 
time.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to