microsoft / garnet

Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients.
https://microsoft.github.io/garnet/
MIT License
9.71k stars 459 forks source link

Unpin PoolEntry items in LimitedFixedBufferPool class? #460

Closed AliKhalili closed 2 weeks ago

AliKhalili commented 2 weeks ago

Describe the bug

I recently came across the LimitedFixedBufferPool class and noticed that its Dispose method doesn't dispose of individual PoolEntry items after dequeuing them. This isn't a major issue, but if we're using handles to pin entry instances, it would be better to unpin these handles when disposing. Is there a reason behind that?

Steps to reproduce the bug

n/a

Expected behavior

No response

Screenshots

No response

Release version

No response

IDE

No response

OS version

No response

Additional context

No response

vazois commented 2 weeks ago

Thanks for bringing this too our attention. We are not currently using the handles option for the PoolEntry. I created PR #465 to remove it all together to avoid any confusion and possible misuse in the future.