repository: Fix error handling in repack

When storing a blob fails, this is a fatal error which must not be
retried.
This commit is contained in:
Michael Eischer 2021-09-04 16:09:34 +02:00
parent 4b3dc415ef
commit 47554a3428
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import (
"sort"
"sync"
"github.com/cenkalti/backoff"
"github.com/restic/chunker"
"github.com/restic/restic/internal/backend/dryrun"
"github.com/restic/restic/internal/cache"
@ -822,7 +823,7 @@ func StreamPack(ctx context.Context, beLoad BackendLoadFn, key *crypto.Key, pack
err = handleBlobFn(entry.BlobHandle, plaintext, err)
if err != nil {
return err
return backoff.Permanent(err)
}
}
return nil