[Bugs] [Bug 1292379] md5sum of files mismatch after the self-heal is complete on the file

bugzilla at redhat.com bugzilla at redhat.com
Tue Dec 22 08:29:11 UTC 2015


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



--- Comment #6 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/13001 committed in master by Pranith Kumar
Karampuri (pkarampu at redhat.com) 
------
commit 683c880a02086effc5009a8420289b445ea423f0
Author: Krutika Dhananjay <kdhananj at redhat.com>
Date:   Thu Dec 17 17:41:08 2015 +0530

    cluster/afr: Fix data loss due to race between sh and ongoing write

    Problem:

    When IO is happening on a file and a brick goes down comes back up
    during this time, protocol/client translator attempts reopening of the
    fd on the gfid handle of the file. But if another client renames this
    file while a brick was down && writes were in progress on it, once this
    brick is back up, there can be a race between reopening of the fd and
    entry self-heal replaying the effect of the rename() on the sink brick.
    If the reopening of the fd happens first, the application's writes
    continue to go into the data blocks associated with the gfid.
    Now entry-self-heal deletes 'src' and creates 'dst' file on the sink,
    marking dst as a 'newentry'.  Data self-heal is also completed on 'dst'
    as a result and self-heal terminates. If at this point the application
    is still writing to this fd, all writes on the file after self-heal
    would go into the data blocks associated with this fd, which would be
    lost once the fd is closed. The result - the 'dst' file on the source
    and sink are not the same and there is no pending heal on the file,
    leading to silent corruption on the sink.

    Fix:

    Leverage http://review.gluster.org/#/c/12816/ to ensure the gfid handle
    path gets saved in .glusterfs/unlink until the fd is closed on the file.
    During this time, when self-heal sends mknod() with gfid of the file,
    do the following:
    link() the gfid handle under .glusterfs/unlink to the new path to be
    created in mknod() and
    rename() the gfid handle to go back under .glusterfs/ab/cd/.

    Change-Id: I86ef1f97a76ffe11f32653bb995f575f7648f798
    BUG: 1292379
    Signed-off-by: Krutika Dhananjay <kdhananj at redhat.com>
    Reviewed-on: http://review.gluster.org/13001
    Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>
    Tested-by: NetBSD Build System <jenkins at build.gluster.org>
    Tested-by: Gluster Build System <jenkins at build.gluster.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=l61n90OQ2q&a=cc_unsubscribe


More information about the Bugs mailing list