2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-29 16:23:59 +00:00

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

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