Skip to content

Iterator interface leaks files #32

@kschiess

Description

@kschiess

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions