Repair: do not mark deleted when upstream object is not found

With the previous behaviour, repairing could see some data as absent
and decide that the object or version was deleted,
thus going on to delete the version and blocks.
In the case where read_quorum + write_quorum <= replication_factor
however, entries may not yet be returned by the get, thus data would
have been deleted that should hot have been. The new behavior is more
cautious and just skips the entry when the warning is emitted.
This commit is contained in:
Alex 2020-05-04 13:30:42 +00:00
parent b46a7788d1
commit fa13cf6996

View file

@ -112,10 +112,10 @@ impl Repair {
.any(|x| x.uuid == version.uuid && x.state != ObjectVersionState::Aborted),
None => {
warn!(
"Repair versions: object for version {:?} not found",
"Repair versions: object for version {:?} not found, skipping.",
version
);
false
continue;
}
};
if !version_exists {
@ -158,10 +158,10 @@ impl Repair {
Some(v) => !v.deleted,
None => {
warn!(
"Block ref repair: version for block ref {:?} not found",
"Block ref repair: version for block ref {:?} not found, skipping.",
block_ref
);
false
continue;
}
};
if !ref_exists {