"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
azureblob: retry InvalidBlobOrBlock error as it may indicate block concurrency problems
Nick Craig-Woodb1d8da484bd6
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.goindex e639415bd..19b607745 100644--- a/backend/azureblob/azureblob.go+++ b/backend/azureblob/azureblob.go@@ -257,6 +257,12 @@ var retryErrorCodes = []int{func (f *Fs) shouldRetry(err error) (bool, error) {// FIXME interpret special errors - more to do hereif storageErr, ok := err.(azblob.StorageError); ok {+ switch storageErr.ServiceCode() {+ case "InvalidBlobOrBlock":+ // These errors happen sometimes in multipart uploads+ // because of block concurrency issues+ return true, err+ }statusCode := storageErr.Response().StatusCodefor _, e := range retryErrorCodes {if statusCode == e {@@ -1322,7 +1328,7 @@ outer:// Upload the block, with MD5 for checkmd5sum := md5.Sum(buf)transactionalMD5 := md5sum[:]- err = o.fs.pacer.Call(func() (bool, error) {+ err := o.fs.pacer.Call(func() (bool, error) {bufferReader := bytes.NewReader(buf)wrappedReader := wrap(bufferReader)rs := readSeeker{wrappedReader, bufferReader}