diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2018-04-12 15:47:00 +0530 |
|---|---|---|
| committer | Krutika Dhananjay <kdhananj@redhat.com> | 2018-06-20 15:14:56 +0530 |
| commit | 0751039eadb23b8658423477aa81964b339b4f5e (patch) | |
| tree | bd09f83a94840bfd8b8e8d02b80d5bc1666ed57d /tests/bugs/shard/shard-inode-refcount-test.t | |
| parent | cc2f2e7bfef6ca47e740c5ee6b4665ec2880f860 (diff) | |
features/shard: Perform shards deletion in the background
A synctask is created that would scan the indices from
.shard/.remove_me, to delete the shards associated with the
gfid corresponding to the index bname and the rate of deletion
is controlled by the option features.shard-deletion-rate whose
default value is 100.
The task is launched on two accounts:
1. when shard receives its first-ever lookup on the volume
2. when a rename or unlink deleted an inode
Change-Id: Ia83117230c9dd7d0d9cae05235644f8475e97bc3
updates: bz#1568521
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'tests/bugs/shard/shard-inode-refcount-test.t')
| -rw-r--r-- | tests/bugs/shard/shard-inode-refcount-test.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/bugs/shard/shard-inode-refcount-test.t b/tests/bugs/shard/shard-inode-refcount-test.t index c92dc07789d..087c8ba7815 100644 --- a/tests/bugs/shard/shard-inode-refcount-test.t +++ b/tests/bugs/shard/shard-inode-refcount-test.t @@ -5,6 +5,8 @@ cleanup +SHARD_COUNT_TIME=5 + TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 $H0:$B0/${V0}0 @@ -18,7 +20,8 @@ TEST dd if=/dev/zero conv=fsync of=$M0/one-plus-five-shards bs=1M count=23 ACTIVE_INODES_BEFORE=$(get_mount_active_size_value $V0) TEST rm -f $M0/one-plus-five-shards -#EXPECT `expr $ACTIVE_INODES_BEFORE - 4` get_mount_active_size_value $V0 +# Expect 5 inodes less. But one inode more than before because .remove_me would be created. +EXPECT_WITHIN $SHARD_COUNT_TIME `expr $ACTIVE_INODES_BEFORE - 5 + 1` get_mount_active_size_value $V0 EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 TEST $CLI volume stop $V0 |
