]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_rados_api_tier: do fewer writes in HitSetWrite
authorSage Weil <sage@redhat.com>
Fri, 25 Jul 2014 20:51:45 +0000 (13:51 -0700)
committerSage Weil <sage@redhat.com>
Sat, 9 Aug 2014 18:51:12 +0000 (11:51 -0700)
We don't need to do quite so many writes.  It can be slow when we are
thrashing and aren't doing anything in parallel.

Fixes: #8932
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit c5f766bb16c0ab3c3554e73791ad0b74077ad35c)

src/test/librados/tier.cc

index 897eef9e294cabc4dc60b3ba4a9a16a9c85747c9..953a765c0082d5f95ec2b85c7d1147411a9f5716 100644 (file)
@@ -2066,8 +2066,10 @@ TEST_F(LibRadosTwoPoolsPP, HitSetWrite) {
 
   cache_ioctx.set_namespace("");
 
+  int num = 200;
+
   // do a bunch of writes
-  for (int i=0; i<1000; ++i) {
+  for (int i=0; i<num; ++i) {
     bufferlist bl;
     bl.append("a");
     ASSERT_EQ(0, cache_ioctx.write(stringify(i), bl, 1, 0));
@@ -2103,7 +2105,7 @@ TEST_F(LibRadosTwoPoolsPP, HitSetWrite) {
       num_pg = _get_pg_num(cluster, cache_pool_name);
   }
 
-  for (int i=0; i<1000; ++i) {
+  for (int i=0; i<num; ++i) {
     string n = stringify(i);
     uint32_t hash = cache_ioctx.get_object_hash_position(n);
     hobject_t oid(sobject_t(n, CEPH_NOSNAP), "", hash,