[Bugs] [Bug 1412135] rename of the same file from multiple clients with caching enabled may result in duplicate files

bugzilla at redhat.com bugzilla at redhat.com
Sat Apr 29 14:28:42 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1412135



--- Comment #8 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/16375 committed in master by Raghavendra G
(rgowdapp at redhat.com) 
------
commit 8b2ef5076284e44a87698393c8094c925fa863fa
Author: Susant Palai <spalai at redhat.com>
Date:   Wed Jan 11 16:04:47 2017 +0530

    dht: send lookup on old name inside rename with bname and pargfid

    Inside rename, a lookup is done on the source name to make sure that
    the file is there. But we used to do a gfid based lookup and hence,
    even if the source name was renamed to a new name from some other client,
    lookup will be successful as server3_3_lookup will fetch the new path
    based on the gfid.

    So even if the source file does not exist any more rename will carry on,
    and as server3_3_link(destination is hashed to a different brick other
    than source cached scenario) also does gfid based resolve, it wont
    detect that the source name does not exist and hardlink creation will be
    successful (since gfid based resolve will get the new dentry).

    To solve this problem, do a name based lookup inside rename. So that
    rename will fail right away if the source does not exist.

    Change-Id: Ieba8bdd6675088dbf18de90ed4622df043d163bd
    BUG: 1412135
    Signed-off-by: Susant Palai <spalai at redhat.com>
    Reviewed-on: https://review.gluster.org/16375
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: N Balachandran <nbalacha at redhat.com>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Raghavendra G <rgowdapp at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=RKLbPGhm79&a=cc_unsubscribe


More information about the Bugs mailing list