Bug 1139988 - DHT :- data loss - file is missing on renaming same file from multiple client at same time
Summary: DHT :- data loss - file is missing on renaming same file from multiple client...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: 3.4.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1117135 1117851 1146889
Blocks: glusterfs-3.4.6 1129527 1138387
TreeView+ depends on / blocked
 
Reported: 2014-09-10 07:01 UTC by Raghavendra G
Modified: 2015-04-13 07:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1117851
Environment:
Last Closed: 2015-04-13 07:07:17 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Comment 1 Anand Avati 2014-09-10 08:37:40 UTC
REVIEW: http://review.gluster.org/8672 (dht: fix rename race) posted (#1) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 2 Anand Avati 2014-09-10 08:38:08 UTC
REVIEW: http://review.gluster.org/8675 (storage/posix: removing deleting entries in case of creation failures) posted (#1) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 3 Anand Avati 2014-09-10 08:38:11 UTC
REVIEW: http://review.gluster.org/8676 (dht: fix rename race) posted (#1) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 4 Anand Avati 2014-09-24 15:14:18 UTC
REVIEW: http://review.gluster.org/8676 (dht: fix rename race) posted (#2) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 5 Anand Avati 2014-09-24 15:14:21 UTC
REVIEW: http://review.gluster.org/8675 (storage/posix: removing deleting entries in case of creation failures) posted (#2) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 6 Anand Avati 2014-09-24 15:14:30 UTC
REVIEW: http://review.gluster.org/8672 (dht: fix rename race) posted (#2) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 7 Anand Avati 2014-09-25 12:00:58 UTC
REVIEW: http://review.gluster.org/8676 (dht: fix rename race) posted (#3) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 8 Anand Avati 2014-09-25 12:01:01 UTC
REVIEW: http://review.gluster.org/8675 (storage/posix: removing deleting entries in case of creation failures) posted (#3) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 9 Anand Avati 2014-09-25 12:01:09 UTC
REVIEW: http://review.gluster.org/8672 (dht: fix rename race) posted (#3) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 10 Anand Avati 2014-09-25 13:53:48 UTC
REVIEW: http://review.gluster.org/8676 (dht: fix rename race) posted (#4) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 11 Anand Avati 2014-09-25 13:53:51 UTC
REVIEW: http://review.gluster.org/8675 (storage/posix: removing deleting entries in case of creation failures) posted (#4) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 12 Anand Avati 2014-09-25 13:53:59 UTC
REVIEW: http://review.gluster.org/8672 (dht: fix rename race) posted (#4) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 13 Anand Avati 2014-10-09 05:40:26 UTC
REVIEW: http://review.gluster.org/8676 (dht: fix rename race) posted (#5) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 14 Anand Avati 2014-10-09 05:40:30 UTC
REVIEW: http://review.gluster.org/8675 (storage/posix: removing deleting entries in case of creation failures) posted (#5) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 15 Anand Avati 2014-10-09 05:40:39 UTC
REVIEW: http://review.gluster.org/8672 (dht: fix rename race) posted (#5) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 16 Anand Avati 2014-10-09 07:34:48 UTC
REVIEW: http://review.gluster.org/8676 (dht: fix rename race) posted (#6) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 17 Anand Avati 2014-10-09 07:34:51 UTC
REVIEW: http://review.gluster.org/8675 (storage/posix: removing deleting entries in case of creation failures) posted (#6) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 18 Anand Avati 2014-10-09 07:35:00 UTC
REVIEW: http://review.gluster.org/8672 (dht: fix rename race) posted (#6) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 19 Anand Avati 2014-10-20 14:52:52 UTC
COMMIT: http://review.gluster.org/8672 committed in release-3.4 by Kaleb KEITHLEY (kkeithle) 
------
commit a7356806f9f7c148d4e0a972f6a418d1ca82bcd0
Author: Jeff Darcy <jdarcy>
Date:   Tue Jul 8 21:56:04 2014 -0400

    dht: fix rename race
    
    If two clients try to rename the same file at the same time, we
    sometimes end up with *no file at all* in either the old or new
    location.  That's kind of bad.  The culprit seems to be some overly
    aggressive cleanup code.  AFAICT, based on today's study of the code,
    the intent of the changed section is to remove any linkfile we might
    have created before the actual rename.  However, what we're removing
    might not be our extra link.  If we're racing with another client that's
    also doing a rename, it might be the only remaining link to the user's
    data.  The solution, which is good enough to pass this test but almost
    certainly still not complete, is to be more selective about when we do
    this unlink.  Now, we only do it if we know that, at some point, we did
    in fact create the link without error (notably ENOENT on the source or
    EEXIST on the destination) ourselves.
    
    Change-Id: I8d8cce150b6f8b372c9fb813c90be58d69f8eb7b
    BUG: 1139988
    Signed-off-by: Jeff Darcy <jdarcy>
    Reviewed-on: http://review.gluster.org/8269
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/8672
    Reviewed-by: Raghavendra G <rgowdapp>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 20 Anand Avati 2014-10-20 14:54:27 UTC
COMMIT: http://review.gluster.org/8675 committed in release-3.4 by Kaleb KEITHLEY (kkeithle) 
------
commit fe5cf303121215be6f00b4da0796fbf83922ec36
Author: Raghavendra G <rgowdapp>
Date:   Fri Sep 5 12:05:15 2014 +0530

    storage/posix: removing deleting entries in case of creation failures
    
    The code is not atomic enough to not to delete a dentry created by a
    prallel dentry creation operation.
    
    Change-Id: I9bd6d2aa9e7a1c0688c0a937b02a4b4f56d7aa3d
    BUG: 1139988
    Signed-off-by: Raghavendra G <rgowdapp>
    Reviewed-on: http://review.gluster.org/8327
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/8675
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 21 Anand Avati 2014-10-20 14:54:42 UTC
COMMIT: http://review.gluster.org/8676 committed in release-3.4 by Kaleb KEITHLEY (kkeithle) 
------
commit ebdb73daa1c4553b263b208afd22a299e6b7b233
Author: Nithya Balachandran <nbalacha>
Date:   Mon Jul 21 18:46:14 2014 +0530

    dht: fix rename race
    
    Additional check to check if we created the linkto
    file before deleting it in the rename cleanup function
    
    Change-Id: I919cd7cb24f948ba4917eb9cf50d5169bb730a67
    BUG: 1139988
    Signed-off-by: Nithya Balachandran <nbalacha>
    Reviewed-on: http://review.gluster.org/8338
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>
    Reviewed-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/8676
    Reviewed-by: Kaleb KEITHLEY <kkeithle>


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