summaryrefslogtreecommitdiffstats
path: root/tests/basic
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-06-27 15:21:26 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-07-11 23:13:53 -0700
commitceac3b4172e7c689941ec3e734eca6c537e69368 (patch)
treecc6d9fe4bb62819eb19a4f22281578b7d2decabd /tests/basic
parentf938b3a26ffab9482d5f910ee76d2bb2b370517f (diff)
afr, index: Clean up stale directory and file indices in granular entry sh
Specifically when a directory tree is removed (rm -rf) while a brick is down, both the directory index and the name indices of the files and subdirs under it will remain. Self-heal will need to pick up these and remove them. Towards this, afr sh will now also crawl indices/entry-changes and call an rmdir on the dir if the directory index is stale. On the brick side, rmdir fop has been implemented for index xl, which would delete the directory index and its contents if present in a synctask. Change-Id: I8b527331c2547e6c141db6c57c14055ad1198a7e BUG: 1331323 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14832 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/afr/granular-esh/granular-esh.t10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/basic/afr/granular-esh/granular-esh.t b/tests/basic/afr/granular-esh/granular-esh.t
index 4adcfc7456a..ee53878e004 100644
--- a/tests/basic/afr/granular-esh/granular-esh.t
+++ b/tests/basic/afr/granular-esh/granular-esh.t
@@ -149,10 +149,9 @@ TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$ROOT_GFID/dir
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$ROOT_GFID/newdir
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$ROOT_GFID/file_stale
-# To be uncommented once index xl is made to purge the parent gfid dir on rm -rf
-#TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir/f1
-#TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir/f2
-#TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir/f3
+TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir/f1
+TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir/f2
+TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir/f3
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_newdir/f1
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_newdir/f2
@@ -164,7 +163,6 @@ TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_newsubdir/f3
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$ROOT_GFID
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_newdir
TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_newsubdir
-# To be uncommented once index xl is made to purge the parent gfid dir on rm -rf
-#TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir
+TEST ! stat $B0/${V0}1/.glusterfs/indices/entry-changes/$gfid_dir
cleanup