From e1497301cf03b5723378c363deef32bd590baf4c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 25 Nov 2025 20:20:19 -0800 Subject: [PATCH] Document multipart upload URL HA limitation Addresses review comment on s3api_object_handlers_multipart.go:442 Add comment documenting that part upload URLs point to the current active filer (tracked by FilerClient), which is better than always using the first filer but still creates a potential point of failure if that filer becomes unavailable during upload. Suggest TODO solutions: - Use virtual hostname/load balancer for filers - Have S3 server proxy uploads to healthy filers Current behavior provides reasonable availability by using the currently active/healthy filer rather than being pinned to first filer. --- weed/s3api/s3api_object_handlers_multipart.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/s3api/s3api_object_handlers_multipart.go b/weed/s3api/s3api_object_handlers_multipart.go index 137cd73fe..9a288ba7f 100644 --- a/weed/s3api/s3api_object_handlers_multipart.go +++ b/weed/s3api/s3api_object_handlers_multipart.go @@ -438,6 +438,10 @@ func (s3a *S3ApiServer) genUploadsFolder(bucket string) string { } func (s3a *S3ApiServer) genPartUploadUrl(bucket, uploadID string, partID int) string { + // Note: URL points to current active filer tracked by FilerClient + // If this filer becomes unavailable, clients uploading parts will fail + // TODO: Consider using a virtual hostname that load-balances to healthy filers, + // or have S3 server proxy the upload to a healthy filer return fmt.Sprintf("http://%s%s/%s/%04d_%s.part", s3a.getFilerAddress().ToHttpAddress(), s3a.genUploadsFolder(bucket), uploadID, partID, uuid.NewString()) }