v2.4.3
版本发布时间: 2022-11-29 22:59:06
ClickHouse/clickhouse-go最新发布版本:v2.29.0(2024-09-24 20:36:15)
Bug Fixes
- Fix in batch concurrency - batch could panic if used in separate go routines.
The issue was originally detected due to the use of a batch in a go routine and Abort being called after the connection was released on the batch. This would invalidate the connection which had been subsequently reassigned.
This issue could occur as soon as the conn is released (this can happen in a number of places e.g. after Send
or an Append
error), and it potentially returns to the pool for use in another go routine. Subsequent releases could then occur e.g., the user calls Abort
mainly but also Send
would do it. The result is the connection being closed in the release function while another batch or query potentially used it.
This release includes a guard to prevent release from being called more than once on a batch. It assumes that batches are not thread-safe - they aren't (only connections are).