clickhouse-java
clickhouse-java copied to clipboard
Request cancelation
Describe the bug
Currently it is only hypothesis.
Common pattern of doing reads is:
try (Response response = client.read().query().executeAndWait()) {
// read from response
} catch (Exception e) {
// throw
}
In this case when timeout happens:
- TimeoutException is thrown
- there is no response object - nothing to close
- request still running in some executor and it consumes 1 thread.
Problem
There is no way to cancel request and no way to make proper connection release.