From 46920e3bd38d9ae7c1910d0bd83eff309ab20c66 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Fri, 4 Mar 2016 13:05:09 +0530 Subject: cluster/ec: Provide an option to enable/disable eager lock Problem: If a fop takes lock, and completes its operation, it waits for 1 second before releasing the lock. However, If ec find any lock contention within this time period, it release the lock immediately before time expires. As we take lock on first brick, for few operations, like read, it might happen that discovery of lock contention might take long time and can degrades the performance. Solution: Provide an option to enable/disable eager lock. If eager lock is disabled, lock will be released as soon as fop completes. gluster v set disperse.eager-lock on gluster v set disperse.eager-lock off master- http://review.gluster.org/13605 Change-Id: I000985a787eba3c190fdcd5981dfbf04e64af166 BUG: 1318965 Signed-off-by: Ashish Pandey Reviewed-on: http://review.gluster.org/13773 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri --- tests/bugs/replicate/bug-1297695.t | 2 +- tests/bugs/replicate/bug-821056.t | 2 +- tests/bugs/replicate/bug-921231.t | 4 ++-- tests/bugs/replicate/bug-966018.t | 2 +- tests/bugs/replicate/bug-976800.t | 2 +- tests/bugs/replicate/bug-979365.t | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/bugs/replicate/bug-1297695.t b/tests/bugs/replicate/bug-1297695.t index e0f431684e8..d5c1a214fe2 100644 --- a/tests/bugs/replicate/bug-1297695.t +++ b/tests/bugs/replicate/bug-1297695.t @@ -13,7 +13,7 @@ TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1 -TEST $CLI volume set $V0 eager-lock on +TEST $CLI volume set $V0 cluster.eager-lock on TEST $CLI volume set $V0 post-op-delay-secs 3 TEST $CLI volume set $V0 cluster.entry-self-heal off TEST $CLI volume set $V0 cluster.data-self-heal off diff --git a/tests/bugs/replicate/bug-821056.t b/tests/bugs/replicate/bug-821056.t index 02a9c78b6f0..a1633004404 100644 --- a/tests/bugs/replicate/bug-821056.t +++ b/tests/bugs/replicate/bug-821056.t @@ -8,7 +8,7 @@ TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} -TEST $CLI volume set $V0 eager-lock off +TEST $CLI volume set $V0 cluster.eager-lock off TEST $CLI volume set $V0 cluster.self-heal-daemon off TEST $CLI volume set $V0 performance.quick-read off TEST $CLI volume set $V0 performance.open-behind off diff --git a/tests/bugs/replicate/bug-921231.t b/tests/bugs/replicate/bug-921231.t index 93c642beb1e..81504612f63 100644 --- a/tests/bugs/replicate/bug-921231.t +++ b/tests/bugs/replicate/bug-921231.t @@ -3,7 +3,7 @@ . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc -# This test writes to same file with 2 fds and tests that eager-lock is not +# This test writes to same file with 2 fds and tests that cluster.eager-lock is not # causing extra delay because of post-op-delay-secs cleanup; @@ -14,7 +14,7 @@ function write_to_file { TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1 -TEST $CLI volume set $V0 eager-lock on +TEST $CLI volume set $V0 cluster.eager-lock on TEST $CLI volume set $V0 post-op-delay-secs 3 TEST $CLI volume set $V0 client-log-level DEBUG TEST $CLI volume start $V0 diff --git a/tests/bugs/replicate/bug-966018.t b/tests/bugs/replicate/bug-966018.t index be4d0b97b88..ec3beb15d56 100644 --- a/tests/bugs/replicate/bug-966018.t +++ b/tests/bugs/replicate/bug-966018.t @@ -4,7 +4,7 @@ . $(dirname $0)/../../volume.rc . $(dirname $0)/../../nfs.rc -#This tests if eager-lock blocks metadata operations on nfs/fuse mounts. +#This tests if cluster.eager-lock blocks metadata operations on nfs/fuse mounts. #If it is not woken up, INODELK from the next command waits #for post-op-delay secs. diff --git a/tests/bugs/replicate/bug-976800.t b/tests/bugs/replicate/bug-976800.t index 8311734ab24..27f8b27619e 100644 --- a/tests/bugs/replicate/bug-976800.t +++ b/tests/bugs/replicate/bug-976800.t @@ -20,7 +20,7 @@ TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} TEST $CLI volume set $V0 ensure-durability off -TEST $CLI volume set $V0 eager-lock off +TEST $CLI volume set $V0 cluster.eager-lock off TEST $CLI volume set $V0 flush-behind off TEST $CLI volume start $V0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 diff --git a/tests/bugs/replicate/bug-979365.t b/tests/bugs/replicate/bug-979365.t index b1396c23348..c09c7d51772 100755 --- a/tests/bugs/replicate/bug-979365.t +++ b/tests/bugs/replicate/bug-979365.t @@ -15,7 +15,7 @@ TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} TEST $CLI volume set $V0 ensure-durability on -TEST $CLI volume set $V0 eager-lock off +TEST $CLI volume set $V0 cluster.eager-lock off TEST $CLI volume start $V0 TEST $CLI volume profile $V0 start TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 -- cgit