Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
gomaasapi: use a giant honking lock around all API calls #3
+21
−7
Conversation
|
|
|
let's try this $$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-gomaasapi |
added a commit
that referenced
this pull request
Jan 19, 2016
jujubot
merged commit e173bc8
into
juju:master
Jan 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
davecheney commentedJan 19, 2016
The test server mock has a lot of mutable state, none of it guarded
by locks. It is possible to go through each field and check who uses
it, find all their methods, add locks, rinse, repeat.
Or, we could do something really dirty and serialise all API access
through one mutex. This has the obvious side effect that API calls
are no longer concurrent, but was their any promise of that before?
The change also has the effect that a memory barrier, covering all
the state in the test server structure, is asserted before and after
each API call
Also, a tonne of
gofmt