Bug 1272362 - Fix in afr transaction code
Summary: Fix in afr transaction code
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ravishankar N
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1273334 1275906
TreeView+ depends on / blocked
 
Reported: 2015-10-16 08:43 UTC by Ravishankar N
Modified: 2016-06-16 13:40 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1273334 1275906 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:40:19 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Ravishankar N 2015-10-16 08:43:32 UTC
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.

Comment 1 Vijay Bellur 2015-10-16 08:45:57 UTC
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)

Comment 2 Vijay Bellur 2015-10-20 08:44:40 UTC
COMMIT: http://review.gluster.org/12368 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 7945121dda340ec8f25711b2ad3ca70b544de967
Author: Ravishankar N <ravishankar>
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>
    Reviewed-on: http://review.gluster.org/12368
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Reviewed-by: Anuradha Talur <atalur>

Comment 3 Vijay Bellur 2015-10-23 06:10:03 UTC
REVIEW: http://review.gluster.org/12415 (afr: wind writes only on subvols where preop succeeded) posted (#1) for review on master by Ravishankar N (ravishankar)

Comment 4 Vijay Bellur 2015-10-26 08:29:11 UTC
COMMIT: http://review.gluster.org/12415 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit c7e30933f67f8ab8619ea28bb82e0907a26fe370
Author: Ravishankar N <ravishankar>
Date:   Fri Oct 23 11:19:30 2015 +0530

    afr: wind writes only on subvols where preop succeeded
    
    1. Call local->transaction.wind() only on subvols where pre-op
    succeeded.
    
    2. Update op_errno in afr_changelog_cbk call path. This fixes a bug in
    commit 7945121dda340ec8f25711b2ad3ca70b544de967 where we return EUCLEAN
    to the application if pre-op fails on all bricks.
    
    Change-Id: Iab8776e49a992e7a255314bba542742f7607f3ec
    BUG: 1272362
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/12415
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 5 Niels de Vos 2016-06-16 13:40:19 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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[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.