The actual code double the wait time between two calls leading to a
possible 511s of waiting time which sounds a little bit excessive.
This patch offer to reduce the global wait time to 300s and test more
often the rados status to exit the loop earlier. In a local test, that
saves 6 secs per run.
Signed-off-by: Erwan Velu <erwan@redhat.com>
# wait for the object to be evicted from the cache
local evicted
evicted=false
- for i in 1 2 4 8 16 32 64 128 256 ; do
+ for i in `seq 1 300` ; do
if ! rados -p $fast ls | grep obj1 ; then
evicted=true
break
fi
- sleep $i
+ sleep 1
done
$evicted # assert
# the object is proxy read and promoted to the cache
rados -p $slow get obj1 - >/dev/null
# wait for the promoted object to be evicted again
evicted=false
- for i in 1 2 4 8 16 32 64 128 256 ; do
+ for i in `seq 1 300` ; do
if ! rados -p $fast ls | grep obj1 ; then
evicted=true
break
fi
- sleep $i
+ sleep 1
done
$evicted # assert
ceph osd tier remove-overlay $slow