Sorry for the ambiguous explanation, Jihoon
I added more explanation:
1. At close() of Connection object in JDBC Driver, it should release all the resource that the object has
2. Connection uses TajoClient object, which creates netty client object through RpcConnectionPool to connect TajoMaster, QueryMaster, and Worker. After the request completion, however, netty connection is still active.
3. To solve the above problem(2), close() of Connection calls close() of TajoClient, which again calls close() of RpcConnectionPool to release all the resource
4. Problem of the above approach(3) is that RpcConnectionPool is implemented as singleton and multiple TajoClients may share it.
So, instead of calling releaseConnection() of RpcConnectionPool, calling closeConnection(), which avoids sharing problem.
5. for 4, withRetries() method of ServerCallable is also changed to have two options, release or close
6. It may be better that TajoClient creates netty client by itself instead of using RpcConnectionPool
And I've uploaded new patch that removes commented out codes in TajoClient