Because of this change (#6076), the hobject_t will contain pool id, hence
the ghobject_t having this hobject_t will be not equal to ghobject_t().
In newstore, this will cause assertion failure:
FAILED assert(k >= start_key && k < end_key)
The fix is to make compatible with previous change to create a
ghobject_t object with pool id and shard id in newstore.
Fixes: #13801
Reported-by: Zhi Zhang <zhangz.david@outlook.com>
Signed-off-by: Sage Weil <sage@redhat.com>
<< " to " << pretty_binary_string(end_key)
<< " start " << start << dendl;
it = db->get_iterator(PREFIX_OBJ);
- if (start == ghobject_t()) {
+ if (start == ghobject_t() || start == cid.get_min_hobj()) {
it->upper_bound(temp_start_key);
temp = true;
} else {
return coll_t(TYPE_PG_TEMP, pgid, 0);
}
+ ghobject_t get_min_hobj() const {
+ ghobject_t o;
+ switch (type) {
+ case TYPE_PG:
+ o.hobj.pool = pgid.pool();
+ o.set_shard(pgid.shard);
+ break;
+ case TYPE_META:
+ o.hobj.pool = -1;
+ break;
+ default:
+ break;
+ }
+ return o;
+ }
+
void dump(Formatter *f) const;
static void generate_test_instances(list<coll_t*>& o);
};