We need to list objects within the current shard only. We could get away
with being sloppy about shard previously when the ghobject_t sort order
was broken, but not in the new world. Here, it is only necessary that we
capture all generations of the object to get the marker.
Signed-off-by: Sage Weil <sage@redhat.com>
hobject_t *next)
{
assert(ls);
- // Starts with the smallest shard id and generation to
- // make sure the result list has the marker object (
- // it might have multiple generations though, which would
- // be filtered).
- ghobject_t _next(begin, 0, shard_id_t::NO_SHARD);
+ // Starts with the smallest generation to make sure the result list
+ // has the marker object (it might have multiple generations
+ // though, which would be filtered).
+ ghobject_t _next(begin, 0, get_parent()->whoami_shard().shard);
ls->reserve(max);
int r = 0;
while (!_next.is_max() && ls->size() < (unsigned)min) {
sep.hobj.pool = -1;
cout << min << " < " << sep << std::endl;
ASSERT_LT(min, sep);
+
+ sep.set_shard(shard_id_t::NO_SHARD);
+ cout << "sep shard " << sep.shard_id << std::endl;
+ ghobject_t o(hobject_t(object_t(), string(), CEPH_NOSNAP, 0x42,
+ 1, string()));
+ cout << "o " << o << std::endl;
+ ASSERT_GT(o, sep);
}
/*