worker: fix data race in FakeState #2652

Merged
merged 1 commit into from Jun 25, 2015

Conversation

Projects
None yet
2 participants
Contributor

davecheney commented Jun 25, 2015

Fixes LP 1468188

After a discussion it was decided to make the FakeState's set/get EnvironConfig methods look more like the real state, which backs the config.Config value with a map stored in mongodb, rather than sharing a copy of *config.Config.

This has the side effect that each value passed or returned from SetConfig, EnvironConfig will produce a new *config.Config value which is not shared by other callers.

(Review request: http://reviews.vapour.ws/r/2026/)

worker: fix data race in FakeState
Fixes LP 1468188

After a discussion it was decided to make the FakeState's set/get EnvironConfig methods look more like the _real_ state, which backs the config.Config value with a map stored in mongodb, rather than sharing a copy of *config.Config.

This has the side effect that each value passed or returned from SetConfig, EnvironConfig will produce a new *config.Config value which is not shared by other callers.
Contributor

davecheney commented Jun 25, 2015

$$merge$$

Contributor

jujubot commented Jun 25, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jun 25, 2015

Merge pull request #2652 from davecheney/fixedbugs/1468188
worker: fix data race in FakeState

Fixes LP 1468188

After a discussion it was decided to make the FakeState's set/get EnvironConfig methods look more like the _real_ state, which backs the config.Config value with a map stored in mongodb, rather than sharing a copy of *config.Config.

This has the side effect that each value passed or returned from SetConfig, EnvironConfig will produce a new *config.Config value which is not shared by other callers.

(Review request: http://reviews.vapour.ws/r/2026/)

@jujubot jujubot merged commit 397ae8a into juju:master Jun 25, 2015

@davecheney davecheney deleted the davecheney:fixedbugs/1468188 branch Apr 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment