// wait for maps to settle
cluster.wait_for_latest_osdmap();
- ioctx.set_namespace("");
+ 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, ioctx.write(stringify(i), bl, 1, 0));
+ ASSERT_EQ(0, cache_ioctx.write(stringify(i), bl, 1, 0));
}
// get HitSets
// cope with racing splits by refreshing pg_num
if (i == num_pg - 1)
- num_pg = _get_pg_num(cluster, pool_name);
+ 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 = ioctx.get_object_hash_position(n);
+ uint32_t hash = cache_ioctx.get_object_hash_position(n);
hobject_t oid(sobject_t(n, CEPH_NOSNAP), "", hash,
- cluster.pool_lookup(pool_name.c_str()), "");
+ cluster.pool_lookup(cache_pool_name.c_str()), "");
std::cout << "checking for " << oid << std::endl;
bool found = false;
for (int p=0; p<num_pg; ++p) {