tsuna / gohbase

Pure-Go HBase client
Apache License 2.0
737 stars 214 forks source link

caches.go clientDown may have a memory leak problem #251

Open Allyin opened 6 months ago

Allyin commented 6 months ago

I discovered a memory leak in a service that constantly creates, looks up, and deletes tables.

image

the code juse delete the client from array but not close the client. the client's goroutine like receive_rpcs(contain one tmp buffer for conn) will always exist. For example, a table is deleted, but regionsever is normal. Requesting again may trigger the shutdown logic, but I'm not sure.