Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Controllers.yaml use file lock. #4347
Conversation
axw
reviewed
Feb 9, 2016
| @@ -18,3 +36,51 @@ type store struct { | ||
| var DefaultControllerStore = func() (ControllerStore, error) { | ||
| return &store{}, nil | ||
| } | ||
| + | ||
| +func acquireEnvironmentLock(lockName, operation string) (*fslock.Lock, error) { |
axw
Feb 9, 2016
Member
why environment? because copy and paste? if so -- please be intentional, and use meaningful names
axw
reviewed
Feb 9, 2016
| // AllControllers implements ControllersGetter.AllControllers. | ||
| // This implementation gets all controllers defined in the controllers file. | ||
| func (f *store) AllControllers() (map[string]ControllerDetails, error) { | ||
| + lock, err := acquireEnvironmentLock(controllersLockName, "read-all-controllers") |
axw
Feb 9, 2016
Member
a bit verbose; can you please add a store.lock method (and unlock) so we stop repeating things?
|
Couple of nits, otherwise LGTM. Can you please add
fslock needs to die. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
added a commit
that referenced
this pull request
Feb 9, 2016
jujubot
merged commit 4f4786c
into
juju:cloud-credentials
Feb 9, 2016
anastasiamac
deleted the
anastasiamac:controllers-file-lock
branch
Feb 12, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
anastasiamac commentedFeb 9, 2016
Copied from existing cache.yaml support code which is…heading out.