From 47554a3428d5babcd490522660afe5fc5ec4beea Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 4 Sep 2021 16:09:34 +0200 Subject: [PATCH] repository: Fix error handling in repack When storing a blob fails, this is a fatal error which must not be retried. --- internal/repository/repository.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/repository/repository.go b/internal/repository/repository.go index bbacd5196..31bd76685 100644 --- a/internal/repository/repository.go +++ b/internal/repository/repository.go @@ -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