-
Improvements
- Do not allocate a partition map on each tend unless needed.
- Adds
ConnectionsClosed
stat and sets the connection anddataBuffer
to nil in a few places to help the GC. - Use a heap data structure for connection pooling instead of a queue.
This allows better management of connections after a surge, since it keeps the unused connection in the bottom of the heap to close.
It also helps with performance a bit due to better caching of the data structure in CPU.