Bug 1273334 - Fix in afr transaction code
Fix in afr transaction code
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: replicate (Show other bugs)
3.7.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: bugs@gluster.org
:
Depends On: 1272362 1275906
Blocks: glusterfs-3.7.6
  Show dependency treegraph
 
Reported: 2015-10-20 05:02 EDT by Ravishankar N
Modified: 2015-11-17 01:01 EST (History)
2 users (show)

See Also:
Fixed In Version: glusterfs-3.7.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1272362
Environment:
Last Closed: 2015-11-17 01:01:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ravishankar N 2015-10-20 05:02:54 EDT
+++ This bug was initially created as a clone of Bug #1272362 +++

Description of problem:

Found while going through the code:

When winding the pre-op, transaction.pre_op[i] is set. If the pre-op fails,
transaction.failed_subvols[i] is set. If if fails on all chidren, we can
directly proceed to unlock (via afr_changelog_post_op_now) without trying
to wind the write, fail and then go to unlock.

--- Additional comment from Vijay Bellur on 2015-10-16 04:45:57 EDT ---

REVIEW: http://review.gluster.org/12368 (afr: do not wind write if pre-op fails on all children) posted (#1) for review on master by Ravishankar N (ravishankar@redhat.com)

--- Additional comment from Vijay Bellur on 2015-10-20 04:44:40 EDT ---

COMMIT: http://review.gluster.org/12368 committed in master by Pranith Kumar Karampuri (pkarampu@redhat.com) 
------
commit 7945121dda340ec8f25711b2ad3ca70b544de967
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Fri Oct 16 06:23:29 2015 +0530

    afr: do not wind write if pre-op fails on all children
    
    1. When winding the pre-op, transaction.pre_op[i] is set. If the pre-op fails,
    transaction.failed_subvols[i] is set. If if fails on all chidren, we can
    directly proceed to unlock (via afr_changelog_post_op_now) without trying
    to wind the write, fail and then go to unlock.
    
    2. 'fop_subvols' seems to be an unused variable, hence removing it.
    
    Change-Id: I9525628daf48082e979b0093fa0478934495e61f
    BUG: 1272362
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: http://review.gluster.org/12368
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
    Reviewed-by: Anuradha Talur <atalur@redhat.com>
Comment 1 Vijay Bellur 2015-10-20 05:08:28 EDT
REVIEW: http://review.gluster.org/12399 (afr: do not wind write if pre-op fails on all children) posted (#1) for review on release-3.7 by Ravishankar N (ravishankar@redhat.com)
Comment 2 Vijay Bellur 2015-10-26 04:50:02 EDT
REVIEW: http://review.gluster.org/12399 (afr: fixes in transaction code) posted (#2) for review on release-3.7 by Ravishankar N (ravishankar@redhat.com)
Comment 3 Vijay Bellur 2015-10-26 08:41:37 EDT
COMMIT: http://review.gluster.org/12399 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu@redhat.com) 
------
commit da9f8bd6e9421209243afeabbad350cc1d70fdc5
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Mon Oct 26 14:14:18 2015 +0530

    afr: fixes in transaction code
    
    Backport of http://review.gluster.org/#/c/12368/ and
    http://review.gluster.org/#/c/12415/
    
    1. When winding the pre-op, transaction.pre_op[i] is set. If the pre-op
    fails, transaction.failed_subvols[i] is set. If if fails on all chidren,
    we can directly proceed to unlock (via afr_changelog_post_op_now)
    without trying to wind the write, fail and then going to unlock.
    
    2. 'fop_subvols' seems to be an unused variable, hence removing it.
    
    3. Call local->transaction.wind() only on subvols where pre-op succeeded.
    
    Change-Id: I9525628daf48082e979b0093fa0478934495e61f
    BUG: 1273334
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: http://review.gluster.org/12399
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Comment 4 Raghavendra Talur 2015-11-17 01:01:01 EST
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.7.6, please open a new bug report.

glusterfs-3.7.6 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://www.gluster.org/pipermail/gluster-users/2015-November/024359.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

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