Skip to content

db: ensure Open closes opened directories on error#1690

Merged
jbowens merged 1 commit intocockroachdb:masterfrom
jbowens:open-close-dirs
May 17, 2022
Merged

db: ensure Open closes opened directories on error#1690
jbowens merged 1 commit intocockroachdb:masterfrom
jbowens:open-close-dirs

Conversation

@jbowens
Copy link
Copy Markdown
Contributor

@jbowens jbowens commented May 16, 2022

Previously, there were handful of places where an open directory was leaked if
Open returned an error. These were discovered by CockroachDB's goroutine leak
detector while bumping Pebble to include d79f961. The goroutine created by
OpenDir was never being closed.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@jbowens jbowens requested review from a team and itsbilal May 16, 2022 20:34
Previously, there were handful of places where an open directory was leaked if
Open returned an error. These were discovered by CockroachDB's goroutine leak
detector while bumping Pebble to include d79f961. The goroutine created by
OpenDir was never being closed.
@jbowens jbowens force-pushed the open-close-dirs branch from 22d1ec6 to 3e06ce3 Compare May 16, 2022 20:45
Copy link
Copy Markdown
Contributor

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jbowens)

Copy link
Copy Markdown
Contributor

@nicktrav nicktrav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. :lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jbowens)

Copy link
Copy Markdown
Contributor Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTRs!

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jbowens)

@jbowens jbowens merged commit e567fec into cockroachdb:master May 17, 2022
@jbowens jbowens deleted the open-close-dirs branch May 17, 2022 00:39
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

Successfully merging this pull request may close these issues.

4 participants