From b7019a91c2a49a669d45508ae51050da30979474 Mon Sep 17 00:00:00 2001 From: Maciej Zimnoch Date: Wed, 8 Jan 2020 15:17:24 +0100 Subject: [PATCH] fs/operations: Clear accounting before low level retry Statistics of ransfers which were interrupted are not cleared before retry iteration. These transfers completed with over 100 percentage. This change clears transfer accounting before next retry iteration is done in order to keep numbers in track. Fixes #3861 --- fs/operations/operations.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/operations/operations.go b/fs/operations/operations.go index c90c67399..9a0d24ff7 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -402,6 +402,7 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj // Retry if err returned a retry error if fserrors.IsRetryError(err) || fserrors.ShouldRetry(err) { fs.Debugf(src, "Received error: %v - low level retry %d/%d", err, tries, maxTries) + tr.Reset() // skip incomplete accounting - will be overwritten by retry continue } // otherwise finish