"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
s3: treat UploadPart success without ETag as retryable error
CAOShurong660144d311ef
diff --git a/backend/s3/s3.go b/backend/s3/s3.goindex 44b312d0f..791bfc6fc 100644--- a/backend/s3/s3.go+++ b/backend/s3/s3.go@@ -4653,6 +4653,16 @@ func (w *s3ChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader// retry all chunks once have done the first fewreturn true, err}+ if uout == nil || uout.ETag == nil {+ // A successful UploadPart without an ETag header is unusable: the+ // part ETag is required by CompleteMultipartUpload. Proxies and+ // load balancers have been observed emitting empty 200 responses+ // under load - see #9822. Treat it as a retryable error so the+ // pacer retries this chunk, instead of dereferencing a nil ETag+ // in the debug log below or completing the upload with a broken+ // part list.+ return true, fmt.Errorf("UploadPart response for chunk %d has no ETag", chunkNumber+1)+ }return false, nil})if err != nil {