diff options
author | Poornima G <pgurusid@redhat.com> | 2017-04-12 15:24:14 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-04-20 00:18:52 -0400 |
commit | 561766e45a323be3d5c521fdb47f68d71cea776e (patch) | |
tree | 4f2505ff34a5d64caeb7fc1c1693f729a84c956a /tests | |
parent | 2aeca0ef02733ebd9b7979e4c27585f3ebff53d7 (diff) |
Implement negative lookup cache
Before creating any file negative lookups(1 in Fuse, 4 in SMB etc.)
are sent to verify if the file already exists. By serving these
lookups from the cache when possible, increases the create
performance by multiple folds in SMB access and some percentage
in Fuse/NFS access.
Feature page: https://review.gluster.org/#/c/16436
Updates #82
Change-Id: Ib1c0e7ac7a386f943d84f6398c27f9a03665b2a4
BUG: 1442569
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: https://review.gluster.org/16952
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/basic/nl-cache.t | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/basic/nl-cache.t b/tests/basic/nl-cache.t new file mode 100755 index 00000000000..ddd4e257dc9 --- /dev/null +++ b/tests/basic/nl-cache.t @@ -0,0 +1,64 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +TEST glusterd + +TEST $CLI volume create $V0 $H0:$B0/${V0}{0..4} +EXPECT 'Created' volinfo_field $V0 'Status' + +TEST $CLI volume set $V0 performance.nl-cache on +TEST $CLI volume set $V0 features.cache-invalidation on +TEST $CLI volume set $V0 features.cache-invalidation-timeout 600 + +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M1 + +TEST ! ls $M0/file2 +TEST touch $M0/file1 +TEST ! ls $M0/file2 +TEST touch $M0/file2 +TEST ls $M0/file2 +TEST rm $M0/file2 +TEST rm $M0/file1 + +TEST mkdir $M0/dir1 +TEST ! ls -l $M0/dir1/file +TEST mkdir $M0/dir1/dir2 +TEST ! ls -l $M0/dir1/file +TEST ! ls -l $M0/dir1/dir2/file +TEST ls -l $M0/dir1/dir2 +TEST rmdir $M0/dir1/dir2 +TEST rmdir $M0/dir1 + +TEST ! ls -l $M0/file2 +TEST touch $M1/file2 +TEST ls -l $M0/file2 +TEST rm $M1/file2 + +TEST ! ls -l $M0/dir1 +TEST mkdir $M1/dir1 +TEST ls -l $M0/dir1 +TEST ! ls -l $M0/dir1/file1 +TEST mkdir $M1/dir1/dir2 +TEST ! ls -l $M0/dir1/file1 +TEST ls -l $M0/dir1/dir2 +TEST ! ls -l $M1/dir1/file1 + +TEST touch $M0/dir1/file +TEST ln $M0/dir1/file $M0/dir1/file_link +TEST ls -l $M1/dir1/file +TEST ls -l $M1/dir1/file_link +TEST rm $M0/dir1/file +TEST rm $M0/dir1/file_link +TEST rmdir $M0/dir1/dir2 +TEST rmdir $M0/dir1 + +cleanup; +#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 |