ReplicatedPG::recover_backfill: do not update last_backfill prematurely
Previously, we would update last_backfill on the backfill peer to
backfills_in_flight.empty() ? backfill_pos :
backfills_in_flight.begin()->first
which is actually the next backfill to complete. We want to update
last_backfill to the largest completed backfill instead.
We use the pending_backfill_updates mapping to identify the most
recently completed backfill. Due to the previous patch, deletes
will also be included in that mapping.
Related sha1s from master:
4139e75d63b0503dbb7fea8036044eda5e8b7cf1
7a06a71e0f2023f66d003dfb0168f4fe51eaa058
We don't really want to backport those due to the changes in:
9ec35d5ccf6a86c380865c7fc96017a1f502560a
This patch does essentially the same thing, but using backfill_pos.
Fixse: #8162
Signed-off-by: Samuel Just <sam.just@inktank.com>