3cfb2221223a7631f116108aec0a45646e775705 | Author: Jaroslaw Grabowski <jaroslaw.grabowski@datastax.com>
| 2023-03-09 12:35:48+01:00
Fix BufferPool.memoryInUse counter
The counter was incorrectly decremented by the size of the unused portion of the provided buffer.
It is now decremented by the number of bytes actually returned to the pool (that may be different than "size"). The number is calculated as a difference between original and resulting buffer capacity.
patch by Jaroslaw Grabowski <jtgrabowski>, reviewed by Jacek Lewandowski <jacek-lewandowski> for CASSANDRA-18311