ObjectReference indirect;
for (list<MetadataItem>::iterator i = items.begin();
i != items.end(); ++i) {
+ // If indirectly referencing any other metadata logs, be sure those
+ // segments are properly referenced.
+ if (i->reused)
+ add_segment(i->ref.get_segment());
+
// Write out an indirect reference to any previous objects which could
// be reused
if (!i->reused || !indirect.merge(i->ref)) {
const ObjectReference &ref = *i;
object_list.push_back(ref.to_string());
if (ref.is_normal())
- segment_list.insert(ref.get_segment());
+ add_segment(ref.get_segment());
db->UseObject(ref);
}
size = stat_buf.st_size;
object_list.push_back(ref.to_string());
if (ref.is_normal())
- segment_list.insert(ref.get_segment());
+ add_segment(ref.get_segment());
db->UseObject(ref);
size += bytes;