whatyouhide / xandra

Fast, simple, and robust Cassandra/ScyllaDB driver for Elixir.
ISC License
402 stars 54 forks source link

Fix memory leak in `Xandra.Connection` #355

Closed harunzengin closed 8 months ago

harunzengin commented 8 months ago

Closes https://github.com/whatyouhide/xandra/issues/354

Fixed the memory leak in Xandra.Connection that was caused by not releasing stream ids.

This is how the memory usage of our application looks like after the fix at 08.02 around 10:00:

Screenshot 2024-02-09 at 11 31 39
harunzengin commented 8 months ago

@whatyouhide This is ready for review if you have time :)

harunzengin commented 8 months ago

@whatyouhide ready for another pass

harunzengin commented 8 months ago

@whatyouhide Also added a telemetry event for a client timeout https://github.com/whatyouhide/xandra/pull/355/commits/3a5f2b28d71afa822a72a854998bd607c9dff5b9

whatyouhide commented 8 months ago

There are some adjustments to do here on docs but this looks fantastic. I'll take care of those @harunzengin, thank you for all the great work and for the patience with this long review time 😄

harunzengin commented 8 months ago

@whatyouhide cool and no worries. Should we release a patch then?

whatyouhide commented 8 months ago

@harunzengin I opened #358 first with a couple of fixes. Before releasing a patch, would you have a chance to run this for a bit and see the impact? Especially around the timed out IDs.