Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator interface leaks files #32

Open
kschiess opened this issue Sep 26, 2013 · 0 comments
Open

Iterator interface leaks files #32

kschiess opened this issue Sep 26, 2013 · 0 comments

Comments

@kschiess
Copy link

A simple statement like

key, value = db.each(reversed: true).first

will leak an iterator and therefore open file descriptors. (even if the db is closed) Doing enough of these and your Ruby process crashes because it exhausts your file ulimit.

We would need an explicit iterator interface or at the very least a #close method on the iterator so that the open files can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant