[openstack-dev] Do we need lock fencing?

Thierry Carrez thierry at openstack.org
Mon Feb 22 09:28:05 UTC 2016

Joshua Harlow wrote:
> After reading over the following interesting article about redis and
> redlock (IMHO it's good overview of distributed locking in general):
> http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html#protecting-a-resource-with-a-lock
> (I personally recommend people read the whole article as well, as it's
> rather interesting, as well as the response from the redis author at
> http://antirez.com/news/101).
> It got me wondering if with all the locking and such that is getting
> used in openstack (distributed or not) that as we move to more
> distributed locking mechanisms (for scale reasons, HA, active-active...)
> that we might need to have a way to fence modifications of a storage
> entry (say belonging to a resource, ie a volume, a network...) with a
> token (or sequence-id) so that the problems mentioned in that blog do
> not affect openstack (apparently issues like it have affected hbase) and
> the more we think about it now (vs. later) the better we will be.
> Anyone have any thoughts on this?

I had the same reaction back when I read that article. That sounds like 
a very useful and relatively cheap primitive to have in our DLM API.

> Perhaps tooz can along with its lock API also provide a token for each
> lock that can be used to interact with a storage layer (and that token
> can checked by the storage layer to avoid storage layer corruption).


Thierry Carrez (ttx)

More information about the OpenStack-dev mailing list