if (blobid) {
consume_blobid(le, false, blobid - 1);
} else {
- BlobRef b = c->new_blob();
+ // dummy onodes might not have collections, we need a check for it.
+ BlobRef b = c ? c->new_blob() : new Blob(nullptr);
uint64_t sbid = 0;
b->decode(p, struct_v, &sbid, false, c);
consume_blob(le, extent_pos, sbid, b);
unsigned n;
denc_varint(n, p);
while (n--) {
- BlueStore::BlobRef b = c->new_blob();
+ BlobRef b = c ? c->new_blob() : new Blob(nullptr);
denc_varint(b->id, p);
uint64_t sbid = 0;
b->decode(p, struct_v, &sbid, true, c);
o->extent_map.fault_range(db, 0, OBJECT_MAX_SIZE);
}
- BlobRef b = c->new_blob();
+ BlobRef b = c ? c->new_blob() : new Blob(nullptr);
b->id = blob_id;
o->extent_map.spanning_blob_map[blob_id] = b;
return shared_blob && shared_blob->is_loaded();
}
inline BufferCacheShard* get_cache() {
- return collection->cache;
+ return collection ? collection->cache : nullptr;
}
uint64_t get_sbid() const {
return shared_blob ? shared_blob->get_sbid() : 0;