Bug 1349385 - [FEAT]jbr: Add rollbacking of failed fops
Summary: [FEAT]jbr: Add rollbacking of failed fops
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Avra Sengupta
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1158654
TreeView+ depends on / blocked
 
Reported: 2016-06-23 11:43 UTC by Avra Sengupta
Modified: 2017-03-06 17:20 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-06 17:20:39 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Avra Sengupta 2016-06-23 11:43:28 UTC
Description of problem:
In case of a failed fop, the failure is detected by the leader in the jbr-server in two places. First during a quorum check of +ve responses when it receives responses from all the followers. At this point if the fop hasn't been successfully journaled at a quorum of followers (as in there is no merit in
trying the fop in the leader as the quorum will never be met), then we fail the fop.

Also if this quorum is met, then the fop is tried on the leader, and after the leader completes the fop a quorum check similar to the previous one is done again, this time including the leaders outcome. If quorum is not met, then we fail the fop.

In these cases the followers and the leader where the fop was successfuly journaled, need to be sent a rollback notifying them that the fop has to be rolledback.


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-06-23 14:46:44 UTC
REVIEW: http://review.gluster.org/14783 (jbr: Sending rollback from failed fop to fdl) posted (#1) for review on master by Avra Sengupta (asengupt)

Comment 2 Vijay Bellur 2016-06-29 12:42:08 UTC
REVIEW: http://review.gluster.org/14783 (jbr: Sending rollback from failed fop to fdl) posted (#2) for review on master by Avra Sengupta (asengupt)

Comment 3 Vijay Bellur 2016-07-05 12:08:13 UTC
REVIEW: http://review.gluster.org/14783 (jbr: Sending rollback from failed fop to fdl) posted (#3) for review on master by Avra Sengupta (asengupt)

Comment 4 Worker Ant 2016-11-03 10:21:41 UTC
REVIEW: http://review.gluster.org/14783 (jbr: Sending rollback from failed fop to fdl) posted (#4) for review on master by Avra Sengupta (asengupt)

Comment 5 Worker Ant 2016-11-07 11:27:23 UTC
REVIEW: http://review.gluster.org/14783 (jbr: Sending rollback from failed fop to fdl) posted (#5) for review on master by Avra Sengupta (asengupt)

Comment 6 Worker Ant 2016-11-08 19:25:30 UTC
COMMIT: http://review.gluster.org/14783 committed in master by Jeff Darcy (jdarcy) 
------
commit 3e50e09723e024cd451c5f48a153fef0fe4857c7
Author: Avra Sengupta <asengupt>
Date:   Thu Jun 23 12:15:22 2016 +0530

    jbr: Sending rollback from failed fop to fdl
    
    In case of a failed fop, the failure is detected
    by the leader in the jbr-server in two places. First
    during a quorum check of +ve responses when it
    receives responses from all the followers. At this
    point if the fop hasn't been successfully journaled
    at a quorum of followers (as in there is no merit in
    trying the fop in the leader as the quorum will never
    be met), then we fail the fop.
    
    Also if this quorum is met, then the fop is tried on
    the leader, and after the leader completes the fop
    a quorum check similar to the previous one is done
    again, this time including the leaders outcome. If
    quorum is not met, then we fail the fop.
    
    In both these cases, when the fop fails we send a -ve
    ack to the client. With this patch, now we will also
    send a rollback through a GF_FOP_IPC to all the followers(and
    also to the leader in the second case of failure). This
    rollback will contain the index and term number of the
    fop which failed. This will be recorded in the respective
    journals of the bricks and will be used to rollback the
    fop on that brick later.
    
    A subsequent write, and it's respective rollback would
    look something like the following in the journal.
    
    The trusted.jbr.term and trusted.jbr.index present in the
    dict of both the logs, relate them, and the presence of
    "rollback-fop" in the dict of IPC indicates that it is a
    rollback fop, and the value 13(stands for GF_FOP_WRITE)
    indicates what kind of rollback operation it is.
    
    === GF_FOP_WRITE
    fd = <gfid 77f12ea2-ca56-40e3-a46e-ba2308baa035>
    vector = <158 bytes>
    offset = 0 (0x0)
    flags = 32769 (0x8001)
    xdata = dict {
     trusted.jbr.term = 0 <2 bytes>
     trusted.jbr.index = 4 <2 bytes>
    }
    === GF_FOP_IPC
    xdata = dict {
     trusted.jbr.term = 0 <2 bytes>
     trusted.jbr.index = 4 <2 bytes>
     rollback-fop = 13 <3 bytes>
    }
    
    Change-Id: I70b6a143d20697153d58e2f719e34ecd1ed160a5
    BUG: 1349385
    Signed-off-by: Avra Sengupta <asengupt>
    Reviewed-on: http://review.gluster.org/14783
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>
    Smoke: Gluster Build System <jenkins.org>

Comment 7 Shyamsundar 2017-03-06 17:20:39 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.10.0, please open a new bug report.

glusterfs-3.10.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/2017-February/030119.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.