Verify, README: address review notes
An unreadable blob may still be a truncated pack, so don't rule out damage in the verify message; README: Hetzner needs WebDAV/SMB and external reachability enabled for the sub-account.
This commit is contained in:
@@ -67,8 +67,9 @@ HELP);
|
||||
$output->writeln('<error>' . count($result['failed']) . ' blob(s) failed verification (corrupted or tampered):</error> ' . implode(', ', $result['failed']));
|
||||
}
|
||||
if ($result['unreadable'] !== []) {
|
||||
$output->writeln('<error>' . count($result['unreadable']) . ' blob(s) could not be read from the location</error> (storage or network error, '
|
||||
. 'not a sign of corruption; run the check again): ' . implode(', ', $result['unreadable']));
|
||||
$output->writeln('<error>' . count($result['unreadable']) . ' blob(s) could not be read from the location</error> (often a temporary storage '
|
||||
. 'or network error: run the check again; if the same blobs stay unreadable, their pack may be damaged or truncated): '
|
||||
. implode(', ', $result['unreadable']));
|
||||
$output->writeln('Last read error: ' . $result['readError']);
|
||||
}
|
||||
if ($result['missing'] === [] && $result['failed'] === [] && $result['unreadable'] === []) {
|
||||
|
||||
@@ -831,10 +831,10 @@ final class Repository {
|
||||
if (!$deep) {
|
||||
return;
|
||||
}
|
||||
// Reading and checking are kept apart: a read that fails (network, storage) says
|
||||
// nothing about the stored data, so it is retried and reported as unreadable,
|
||||
// never as corrupted. Only a blob that was read but does not decrypt or match
|
||||
// its id counts as failed.
|
||||
// Reading and checking are kept apart: a read that fails is usually a network or
|
||||
// storage error, so it is retried and reported as unreadable (a pack that stays
|
||||
// unreadable may still be truncated). Only a blob that was read but does not
|
||||
// decrypt or match its id counts as failed: that is proof of damage.
|
||||
[, $offset, $length] = $this->index->get($id);
|
||||
$encrypted = null;
|
||||
for ($attempt = 1; $attempt <= self::VERIFY_READ_ATTEMPTS && $encrypted === null; $attempt++) {
|
||||
|
||||
Reference in New Issue
Block a user