"unfairness" of juju/mutex

Stuart Bishop stuart.bishop at canonical.com
Thu Nov 17 12:12:55 UTC 2016


On 17 November 2016 at 02:34, roger peppe <roger.peppe at canonical.com> wrote:

> +1 to using blocking flock. Polling is a bad idea with a heavily contended
> lock.
>
> FWIW I still think that mutexing all unit hooks is a bad idea
> that's really only there to paper over the problem that apt-get
> doesn't work well concurrently.
>

apt is just the one you commonly trip over. If there was no mutex, then
charms would need to do their own locking for every single resource they
need to access that might potentially also be accessed by a subordinate
(now or in the future), and hope subordinates also use the lock. So I think
mutexing unit hooks on the same machine is a fantastic idea :) Just
something innocuous like 'adduser' can collide with a subordinate wanting
to stick a config file in that user's home directory.


-- 
Stuart Bishop <stuart.bishop at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20161117/171f2df2/attachment.html>


More information about the Juju-dev mailing list