-
Notifications
You must be signed in to change notification settings - Fork 591
Implement release connection in batch #1062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. I understand the need for this; however not sure if we should expose ReleaseConnection
, but do it for the user instead. This might be overhead for short-live batches.
Lets address comments and think if this approach is clean.
Fewer API functions we expose, the more clarity in the usage.
I agree with you. I think we can add options in |
@EpicStep, your proposal sounds great |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would you mind adding this feature to README?
@jkaflik Thanks. I added this feature to README.md |
When will these changes be released? |
@EpicStep I plan to release it today. In a merge train, your PR is last and has conflicts. It's easy, but it would be great if you push from your fork. |
@jkaflik Yes, I can merge |
# Conflicts: # clickhouse.go # clickhouse_std.go # conn_batch.go
@jkaflik done :) |
With this change, you can append to the batch directly without using helper structures (slice). Earlier this led to an empty pool, although it is not necessary to keep the connection in the batcher for the append operation.
In our implementation we saved about 2GB of memory per pod.
Close #1047