Skip to content

Response Object is not closed when using client v2 #520

Open
@chernser

Description

@chernser

Description

StateProvider has the method setStateRecord (

).
It calls this.chc.queryV2(insertStr); what returns a Records objects holding a reference to a response. Records object should be close to free connection and flush data. There is a risk to loose state update.
If number of result records is not big it is recommended to use com.clickhouse.client.api.Client#queryAll(java.lang.String) and it will close response after reading data so no need to handle it by application.
For insert statements com.clickhouse.client.api.Client#execute(java.lang.String) can be used but response object should be closed anyway.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions