summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd/replace-brick-operations.t
diff options
context:
space:
mode:
authorPranith Kumar Karampuri <pranith.karampuri@phonepe.com>2021-03-22 10:19:27 +0530
committerGitHub <noreply@github.com>2021-03-22 10:19:27 +0530
commitec189a499d85c2aad1d54e55e47df6b95ba02922 (patch)
tree3211292a75638e8612486b6e981158a3a5bce0cf /tests/bugs/glusterd/replace-brick-operations.t
parent1da141ab38463c4a26474456eec81c5992367af9 (diff)
downloadglusterfs-ec189a499d85c2aad1d54e55e47df6b95ba02922.tar.gz
glusterfs-ec189a499d85c2aad1d54e55e47df6b95ba02922.tar.xz
glusterfs-ec189a499d85c2aad1d54e55e47df6b95ba02922.zip
cluster/dht: use readdir for fix-layout in rebalance (#2243)
Problem: On a cluster with 15 million files, when fix-layout was started, it was not progressing at all. So we tried to do a os.walk() + os.stat() on the backend filesystem directly. It took 2.5 days. We removed os.stat() and re-ran it on another brick with similar data-set. It took 15 minutes. We realized that readdirp is extremely costly compared to readdir if the stat is not useful. fix-layout operation only needs to know that the entry is a directory so that fix-layout operation can be triggered on it. Most of the modern filesystems provide this information in readdir operation. We don't need readdirp i.e. readdir+stat. Fix: Use readdir operation in fix-layout. Do readdir+stat/lookup for filesystems that don't provide d_type in readdir operation. fixes: #2241 Change-Id: I5fe2ecea25a399ad58e31a2e322caf69fc7f49eb Signed-off-by: Pranith Kumar K <pranith.karampuri@phonepe.com>
Diffstat (limited to 'tests/bugs/glusterd/replace-brick-operations.t')
-rw-r--r--tests/bugs/glusterd/replace-brick-operations.t2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/replace-brick-operations.t b/tests/bugs/glusterd/replace-brick-operations.t
index 044aa3d6c6..c8b6596903 100644
--- a/tests/bugs/glusterd/replace-brick-operations.t
+++ b/tests/bugs/glusterd/replace-brick-operations.t
@@ -32,6 +32,8 @@ TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}2 $H0:$B0/${V0}3 commit force
#bug-1242543-replace-brick validation
TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0;
+#Make sure new brick comes online before doing replace-brick on next-brick.
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 1
# Replace brick1 without killing
TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}1_new commit force