clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

Request cancelation

Open chernser opened this issue 1 year ago • 0 comments

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.

chernser avatar Aug 02 '24 17:08 chernser