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

fix(subcompaction): Close builder before throttle.Done #1582

Merged
merged 2 commits into from
Nov 5, 2020

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Nov 5, 2020

There was a race condition in the subcompaction code which was caused
because we were doing builder.Close after doing throttle.Done in
subcomapction. This PR fixes that race condition by calling builder.Done
before calling throttle.Done .


This change is Reviewable

There was a race condition in the subcompaction code which was caused
because we were doing builder.Close after doing throttle.Done in
subcomapction. This PR fixes that race condition by calling builder.Done
before calling throttle.Done .
Copy link
Contributor

@NamanJain8 NamanJain8 left a comment

Choose a reason for hiding this comment

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

Great. That's why throttle.Finish() was not blocking for unaccounted goroutine and z.Done() being called caused the race.

@jarifibrahim jarifibrahim merged commit 0860ca0 into master Nov 5, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/subcompact-race branch November 5, 2020 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants