Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

fs/operations: Clear accounting before low level retry

Maciej Zimnochb7019a91c2a4
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