*this = BackfillInterval(bitwise);
}
+ /// clear objects list only
+ void clear_objects() {
+ // make sure we preserve the allocator and ordering!
+ objects = map<hobject_t,eversion_t,hobject_t::Comparator>(
+ hobject_t::Comparator(sort_bitwise));
+ }
+
+ /// reinstantiate with a new start+end position and sort order
void reset(hobject_t start, bool bitwise) {
clear(bitwise);
begin = end = start;
// Check that from is in backfill_targets vector
assert(is_backfill_targets(from));
- BackfillInterval bi;
+ BackfillInterval& bi = peer_backfill_info[from];
bi.begin = m->begin;
bi.end = m->end;
bufferlist::iterator p = m->get_data().begin();
- ::decode(bi.objects, p);
- peer_backfill_info[from] = bi;
+ // take care to preserve ordering!
+ bi.clear_objects();
+ ::decode_noclear(bi.objects, p);
if (waiting_on_backfill.erase(from)) {
if (waiting_on_backfill.empty()) {
get_sort_bitwise()) <= 0 &&
!backfill_info.extends_to_end() && backfill_info.empty()) {
hobject_t next = backfill_info.end;
- backfill_info.clear();
- backfill_info.begin = next;
+ backfill_info.reset(next, get_sort_bitwise());
backfill_info.end = hobject_t::get_max();
update_range(&backfill_info, handle);
backfill_info.trim();
{
assert(is_locked());
dout(10) << "scan_range from " << bi->begin << dendl;
- bi->objects.clear(); // for good measure
+ bi->clear_objects();
vector<hobject_t> ls;
ls.reserve(max);