Bug 1333370

Summary: [FEAT] jbr-server handle lock/unlock fops
Product: [Community] GlusterFS Reporter: Avra Sengupta <asengupt>
Component: replicateAssignee: Avra Sengupta <asengupt>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-27 18:11:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1158654    

Description Avra Sengupta 2016-05-05 11:50:35 UTC
Description of problem:
lock/unlock fops should be handled differently than regular fops so as to make sure that a deadlock between the followers does not arise.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-05-05 12:10:46 UTC
REVIEW: http://review.gluster.org/14226 (jbr/locking: Define path for lock/unlock fops in JBR) posted (#1) for review on master by Avra Sengupta (asengupt)

Comment 2 Vijay Bellur 2016-05-16 10:11:48 UTC
REVIEW: http://review.gluster.org/14226 (jbr/locking: Define path for lock/unlock fops in JBR) posted (#2) for review on master by Avra Sengupta (asengupt)

Comment 3 Vijay Bellur 2016-05-18 12:12:47 UTC
REVIEW: http://review.gluster.org/14226 (jbr/locking: Define path for lock/unlock fops in JBR) posted (#3) for review on master by Avra Sengupta (asengupt)

Comment 4 Vijay Bellur 2016-05-18 12:35:31 UTC
REVIEW: http://review.gluster.org/14226 (jbr/locking: Define path for lock/unlock fops in JBR) posted (#4) for review on master by Avra Sengupta (asengupt)

Comment 5 Vijay Bellur 2016-05-26 06:14:26 UTC
REVIEW: http://review.gluster.org/14226 (jbr/locking: Define path for lock/unlock fops in JBR) posted (#5) for review on master by Avra Sengupta (asengupt)

Comment 6 Vijay Bellur 2016-05-26 15:27:47 UTC
COMMIT: http://review.gluster.org/14226 committed in master by Jeff Darcy (jdarcy) 
------
commit c137f6a7389d7f760e4724f3506180f9cfc0da52
Author: Avra Sengupta <asengupt>
Date:   Mon May 16 14:55:54 2016 +0530

    jbr/locking: Define path for lock/unlock fops in JBR
    
    lock/unlock fops need to be handled differently than
    other 'regular' fops, so as to avoid chances of deadlock
    in blocking calls. This patch addresses the same in the
    following manner, with a caveat.
    
    1. On receiving the fop if the node is a follower, it
       performs the operation (irrespective of it being
       lock/unlock fop), and returns the result.
    
    2. If the node is a leader it follows the following paths
       for lock and unlock fops:
    
       For lock fops :
       -> It performs the fop on itself. If it is a failure, it
          sends -ve ack to the client. If it is successful, it
          dispatches the fop to the followers.
       -> On receiving responses from the followers, it checks
          for quorum (including the leader's outcome). If
          quorum is met, it sends +ve ack to the client.
       -> If quorum is not met, then it *should* issue a rollback
          to the followers, followed by the rollback on the leader.
          It should then send -ve ack to he client.
    
       For unlock fops:
       -> It dispatches the fop on the followers first.
       -> On receiving responses from the followers, it performs
          the fop on itself. On completion, it checks for quorum
          (including the leader's outcome). If quorum is met, it
          sends +ve ack to the client.
       -> If quorum is not met, then it *should* issue a rollback
          on itslef, followed by the rollback on the followers.
          It should then send -ve ack to he client.
    
    Caveat:
       -> jbr-server does not have a rollback framework yet,
          and hence this patch does not perform the rollbacks as
          discussed in the failure scenarios above. The rollback
          framework will be a different dependent patch.
    
    Change-Id: I26961b27cb85f324c1ffeee80e82ec082ffa4465
    BUG: 1333370
    Signed-off-by: Avra Sengupta <asengupt>
    Reviewed-on: http://review.gluster.org/14226
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 7 Shyamsundar 2017-03-27 18:11:33 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.9.0, please open a new bug report.

glusterfs-3.9.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/