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

providers: run datastore GC concurrently #326

Merged
merged 1 commit into from
Apr 20, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Apr 19, 2019

Motivation: Walking the datastore can take time and currently blocks adding/removing providers.

We need to do this in the same goroutine to avoid some logical races.

Alternative to #324

@ghost ghost assigned Stebalien Apr 19, 2019
@ghost ghost added the status/in-progress In progress label Apr 19, 2019
gcSkip map[string]struct{}
gcTime time.Time
gcTimer = time.NewTimer(pm.cleanupInterval)
)
Copy link
Member Author

Choose a reason for hiding this comment

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

I've tried breaking this out into a separate struct but it really doesn't help.

Motivation: Walking the datastore can take time and currently blocks
adding/removing providers.

We need to do this in the same goroutine to avoid some logical races.
@Stebalien Stebalien force-pushed the feat/optimize-provider-gc-3 branch from 79aec7e to e7e9186 Compare April 19, 2019 22:00
@Stebalien Stebalien requested a review from vyzo April 19, 2019 22:00
Copy link
Contributor

@vyzo vyzo left a comment

Choose a reason for hiding this comment

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

much cleaner than the alternative.

@Stebalien Stebalien merged commit ca611b1 into master Apr 20, 2019
@ghost ghost removed the status/in-progress In progress label Apr 20, 2019
@Stebalien Stebalien deleted the feat/optimize-provider-gc-3 branch April 20, 2019 20:10
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.

2 participants