[Gluster-devel] Replace cluster wide gluster locks with volume wide locks

Avra Sengupta asengupt at redhat.com
Wed Sep 11 13:23:27 UTC 2013


As of today most gluster commands take a cluster wide lock, before performing their respective operations. As a result
any two gluster commands, which have no interdependency with each other, can't be executed simultaneously. To
remove this interdependency we propose to replace this cluster wide lock with a volume specific lock, so that two
operations on two different volumes can be performed simultaneously.

By implementing this volume wide lock, our agenda is to achieve the following:
1. Allowing simultaneous volume operations on different volumes. Performing two operations simultaneously on the same
    volume should not be allowed.
2. While a volume is being created, or deleted, operations(like rebalance, geo-rep) should be permitted on other volumes.
3. Two simultaneous volume create or volume delete operations should not be permitted.

We propose to do this in two steps:

1.*Implementing the volume wide lock:*  In order to implement this, we will add a lock consisting of the uuid of the
    originator, to the in-memory volinfo(of that particular volume), in all the nodes of the cluster. Once this lock is
    taken, any other command for the same volume, will not be able to acquire this lock from that particular volume's
    volinfo. Meanwhile other operations on other volumes can still be executed.

2.*Stop using the cluster lock for existing commands:*  Port existing commands to use this framework. We will use
    op-version to take care of backward compatibility for the existing commands. We need to take care of commands like
    volume create, volume delete, rebalance callbacks, implicit volume syncs (when a node comes up), the volume sync
    command which modify the priv->volumes, and also other non-volume operations which work inside the gambit of the
    cluster locks today while implementing this.
Please feel free to provide feedback.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20130911/4e9b8365/attachment-0001.html>

More information about the Gluster-devel mailing list