gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] Duplicate entries with rebalance


From: Pranith Kumar K
Subject: [Gluster-devel] Duplicate entries with rebalance
Date: Thu, 28 Feb 2013 18:35:26 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

hi,
Duplicate entries are seen in a dir because of a bug 916449 in afr(fix is the attached patch), dht (fix: http://review.gluster.com/4587). Even with the fixes I am still able to observe duplicate entries sporadically. I added some logs in dht_readdirp_cbk. According to the logs the entry is read from subvolume replicate-0 once and suvolume replicate-2 the next time. I see that the sticky flag is set in the iatt buf received from replicate-0 subvol where as the sticky flag is not set in the iatt buf received from replicate-2. Please note that the issue is not consistent. when I run the script in a while loop, it hits the bug once in 5-10 runs.

Run it as:
while prove -rfv tests/bugs/test.t; do :; done

Here is the script:

#!/bin/bash

. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc

cleanup;

TEST glusterd
TEST pidof glusterd

function get_dup_files {
        local d=$1
        echo $(ls -rt -d -1 $d/* | sort | uniq -c | egrep -v "^\s*1\s\s*")
}

TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 $H0:$B0/${V0}3
TEST $CLI volume start $V0

TEST glusterfs -s $H0 --volfile-id $V0 $M0;

TEST mkdir $M0/dir{1..10};
#TEST cp /bin/* $M0/;
TEST touch $M0/dir{1..10}/files{1..100};

TEST $CLI volume add-brick $V0 $H0:$B0/${V0}4 $H0:/$B0/${V0}5

TEST $CLI volume rebalance $V0 start force
kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}0.pid`;
TEST $CLI volume start $V0 force;
EXPECT_WITHIN 60 "success:" rebalance_status_field $V0
find $M0 |xargs stat 1>/dev/null;

EXPECT "" get_dup_files $M0/dir1
EXPECT "" get_dup_files $M0/dir2
EXPECT "" get_dup_files $M0/dir3
EXPECT "" get_dup_files $M0/dir4
EXPECT "" get_dup_files $M0/dir5
EXPECT "" get_dup_files $M0/dir6
EXPECT "" get_dup_files $M0/dir7
EXPECT "" get_dup_files $M0/dir8
EXPECT "" get_dup_files $M0/dir9
EXPECT "" get_dup_files $M0/dir10

Pranith.

Attachment: 0001-fix-916449.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]