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

persister: refactor to not be a global #130

Open
jskelcy opened this issue Jan 9, 2019 · 0 comments
Open

persister: refactor to not be a global #130

jskelcy opened this issue Jan 9, 2019 · 0 comments
Labels
api-stability Issues which relate to or block an API compatibility guarantee. bug bv/2

Comments

@jskelcy
Copy link

jskelcy commented Jan 9, 2019

With this PR a race condition has been in the brokertest package.

Johnny's comment on the issue:

But, there's a race here -- multiple NewBroker calls may be made by a single test, exercising having multiple discrete brokers coordinating through shared Etcd. One NewBroker can clobber the allocation action / newReplica call of another. I think the reason this isn't detected by the build now is that CreateJournals, used in tests, synchronously waits for allocation actions to complete before returning.

I'm thinking the proper fix is to have Persister not be a shared global - eg have broker.NewService & broker.newReplica take a SpoolComplete() interface argument, where Service plumbs the instance through to created replicas.

While this is not an issue currently the race should be resolved.

@jgraettinger jgraettinger changed the title Shared Persister race condition in integration tests. persister: refactor to not be a global Apr 24, 2019
@jgraettinger jgraettinger added the api-stability Issues which relate to or block an API compatibility guarantee. label Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-stability Issues which relate to or block an API compatibility guarantee. bug bv/2
Projects
None yet
Development

No branches or pull requests

2 participants