1/2 of objects will now have long names, and we'll shift the region
of the hash space where new objects are created every 1024 objects
created.
Signed-off-by: Samuel Just <sjust@redhat.com>
char buf[100];
snprintf(buf, sizeof(buf), "OBJ_%u", seq);
string name(buf);
+ if (seq % 2) {
+ for (unsigned i = 0; i < 300; ++i) {
+ name.push_back('a');
+ }
+ }
++seq;
return ghobject_t(
hobject_t(
name, string(), rand() & 2 ? CEPH_NOSNAP : rand(),
- seq % 16, // use smaller set of hash values so clone can work
+ (((seq / 1024) % 2) * 0xF00 ) +
+ (seq & 0xFF),
poolid, ""));
}
};