IntersectMBO / lsm-tree

A Haskell library for on-disk tables based on LSM-Trees
Apache License 2.0
25 stars 7 forks source link

Fix #350 by properly cleaning up RunBuilders in tests #351

Closed jorisdral closed 2 weeks ago

jorisdral commented 3 weeks ago

Description

Resolves #350

Checklist

mheinzel commented 3 weeks ago

If we ran these tests in a MockFS, we could assert that all handles get closed properly. Would be sensible to do, maybe in addition to the real FS ones?

jorisdral commented 3 weeks ago

If we ran these tests in a MockFS, we could assert that all handles get closed properly. Would be sensible to do, maybe in addition to the real FS ones?

Good idea. I've added the check. Maybe we can use withSimHasFS in other places as well

jorisdral commented 2 weeks ago

Looks ok but in the first patch I don't see what is the fix for #350. What actual change are we making, why does that fix the running time problem on Windows?

I'm not so sure why the fix works, but what is clear is that the RunBuilder tests were leaking file descriptors, and it looks like that leak was causing a slowdown (or it's a spurious correlation, I don't really have a way to check)