Skip to content
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

More control over connection's buffers #1086

Closed
cergxx opened this issue Sep 6, 2023 · 2 comments
Closed

More control over connection's buffers #1086

cergxx opened this issue Sep 6, 2023 · 2 comments

Comments

@cergxx
Copy link
Contributor

cergxx commented Sep 6, 2023

In my project I have a pool of long-living connections to ClickHouse.
Each of them holds a buffer clickhouse.connect.buffer, which leads to overall big memory usage

I would like to have more control over these buffers – to be able to drop them without closing the connection

Possible solutions:
Add an option to clickhouse.Options like FreeBuffersOnRelease, which would trigger drop of the buffer on every connection release
(Replace b.Buf = b.Buf[:0] with b.Buf = nil)

@jkaflik
Copy link
Contributor

jkaflik commented Sep 6, 2023

Hi @cergxx

Would you like to submit a PR with change?

@cergxx
Copy link
Contributor Author

cergxx commented Sep 7, 2023

Would you like to submit a PR with change?

Yes, I would

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants