moquette icon indicating copy to clipboard operation
moquette copied to clipboard

Fixed SegmentedQueues not being cleaned up on session purge

Open hylkevds opened this issue 2 years ago • 2 comments

Segmented queues were closed, but not cleared on session close. This resulted in segments not being returned to the pool, and thus disk-space not being released. The queues were also not removed from the QueuePool, resulting in a memory leak.

Relates #734

hylkevds avatar Apr 29 '24 14:04 hylkevds

Hi @hylkevds thanks for this PR. I would also add unit test on the unsafequeues.Queue or unsafequeues.QueuePool to verify that a queue purge or close give back the segments to be reused.

I'll look into making some tests for this.

hylkevds avatar May 25 '24 19:05 hylkevds

@andsel: I added a test to verify the queue cleanup and page-file re-use.

hylkevds avatar Aug 03 '24 17:08 hylkevds

Thanks @hylkevds for your contribution to the project!

andsel avatar Aug 02 '25 10:08 andsel