2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-02 09:00:50 +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" "sort"
"sync" "sync"
"github.com/cenkalti/backoff"
"github.com/restic/chunker" "github.com/restic/chunker"
"github.com/restic/restic/internal/backend/dryrun" "github.com/restic/restic/internal/backend/dryrun"
"github.com/restic/restic/internal/cache" "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) err = handleBlobFn(entry.BlobHandle, plaintext, err)
if err != nil { if err != nil {
return err return backoff.Permanent(err)
} }
} }
return nil return nil