Skip to content

storage: surface (*pebble.DB).Close errors, audit iterator leaks #71481

@jbowens

Description

@jbowens

See #71303.

There are more places where test cases leak iterators. During test shutdown when the engine is closed (*pebble.DB).Close returns an error indicating that an iterator was leaked. The *storage.Pebble type discards this error. Any unit tests that leak iterators succeed as a result.

We should fix these leaked iterators. I'm mostly worried about potential usage of these iterators after or concurrent with the closing of the engine.

We've seen a few issues that appear as memory corruption within the block cache #70154 and https://cockroachlabs.slack.com/archives/C026MSSL926/p1633479580006300.

Jira issue: CRDB-10598

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-storageRelating to our storage engine (Pebble) on-disk storage.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-storageStorage Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions