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

db: ensure Open closes opened directories on error #1690

Merged
merged 1 commit into from
May 17, 2022

Conversation

jbowens
Copy link
Collaborator

@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
Member

This change is Reviewable

@jbowens jbowens requested review from itsbilal and a team 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
Member

@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
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
Collaborator 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