diff options
author | Alex Auvolat <alex@adnab.me> | 2020-05-04 13:30:42 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-05-04 13:30:42 +0000 |
commit | fa13cf699646836b464d02aa29109ae9933c99fb (patch) | |
tree | 070d0140b715db9057b2c608778c24f0981b12ba /src/garage/repair.rs | |
parent | b46a7788d160f0cec285d77664e09760d25e2144 (diff) | |
download | garage-fa13cf699646836b464d02aa29109ae9933c99fb.tar.gz garage-fa13cf699646836b464d02aa29109ae9933c99fb.zip |
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.
Diffstat (limited to 'src/garage/repair.rs')
-rw-r--r-- | src/garage/repair.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/garage/repair.rs b/src/garage/repair.rs index f2ca64ae..afea61de 100644 --- a/src/garage/repair.rs +++ b/src/garage/repair.rs @@ -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 { |