// info about a backfill interval on a peer
eversion_t version; /// version at which the scan occurred
map<hobject_t,eversion_t> objects;
- bool sort_bitwise;
hobject_t begin;
hobject_t end;
- explicit BackfillInterval(bool bitwise=true)
- : sort_bitwise(bitwise)
- {}
-
/// clear content
- void clear(bool bitwise=true) {
- *this = BackfillInterval(bitwise);
+ void clear() {
+ *this = BackfillInterval();
}
/// clear objects list only
}
/// reinstantiate with a new start+end position and sort order
- void reset(hobject_t start, bool bitwise) {
- clear(bitwise);
+ void reset(hobject_t start) {
+ clear();
begin = end = start;
}
assert(last_backfill_started == earliest_backfill());
new_backfill = false;
- // initialize BackfillIntervals (with proper sort order)
+ // initialize BackfillIntervals
for (set<pg_shard_t>::iterator i = backfill_targets.begin();
i != backfill_targets.end();
++i) {
- peer_backfill_info[*i].reset(peer_info[*i].last_backfill,
- get_sort_bitwise());
+ peer_backfill_info[*i].reset(peer_info[*i].last_backfill);
}
- backfill_info.reset(last_backfill_started,
- get_sort_bitwise());
+ backfill_info.reset(last_backfill_started);
backfills_in_flight.clear();
pending_backfill_updates.clear();
}
- // sanity check sort orders
- assert(backfill_info.sort_bitwise == get_sort_bitwise());
- for (map<pg_shard_t, BackfillInterval>::iterator i =
- peer_backfill_info.begin();
- i != peer_backfill_info.end();
- ++i) {
- assert(i->second.sort_bitwise == get_sort_bitwise());
- }
-
for (set<pg_shard_t>::iterator i = backfill_targets.begin();
i != backfill_targets.end();
++i) {
if (backfill_info.begin <= earliest_peer_backfill() &&
!backfill_info.extends_to_end() && backfill_info.empty()) {
hobject_t next = backfill_info.end;
- backfill_info.reset(next, get_sort_bitwise());
+ backfill_info.reset(next);
backfill_info.end = hobject_t::get_max();
update_range(&backfill_info, handle);
backfill_info.trim();