mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
osd/PG: fix repair_object when missing on primary
If the object is missing on the primary, we need to fully populate the
missing_loc.needs_recovery_map. This broke with the recent refactoring of
recovery for EC, somewhere around 84e2f39c55
.
Fixes: #8008
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
052519ed4a
commit
6ff645f592
@ -3449,6 +3449,7 @@ void PG::repair_object(
|
||||
assert(waiting_for_unreadable_object.empty());
|
||||
|
||||
pg_log.missing_add(soid, oi.version, eversion_t());
|
||||
missing_loc.add_missing(soid, oi.version, eversion_t());
|
||||
missing_loc.add_location(soid, ok_peer);
|
||||
|
||||
pg_log.set_last_requested(0);
|
||||
|
@ -379,6 +379,10 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void add_missing(const hobject_t &hoid, eversion_t need, eversion_t have) {
|
||||
needs_recovery_map[hoid] = pg_missing_t::item(need, have);
|
||||
}
|
||||
void revise_need(const hobject_t &hoid, eversion_t need) {
|
||||
assert(needs_recovery(hoid));
|
||||
needs_recovery_map[hoid].need = need;
|
||||
|
Loading…
Reference in New Issue
Block a user