ReplicatedPG::recover_backfill: update last_backfill to max() when backfill is complete

Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
Samuel Just 2013-10-28 23:05:30 -07:00
parent ad5655beb2
commit 7a06a71e0f

View File

@ -8153,6 +8153,12 @@ int ReplicatedPG::recover_backfill(
}
assert(!pending_backfill_updates.empty() ||
new_last_backfill == last_backfill_started);
if (pending_backfill_updates.empty() &&
backfill_pos.is_max()) {
assert(backfills_in_flight.empty());
new_last_backfill = backfill_pos;
last_backfill_started = backfill_pos;
}
if (new_last_backfill > pinfo.last_backfill) {
pinfo.last_backfill = new_last_backfill;
epoch_t e = get_osdmap()->get_epoch();