Files
seaweedfs/weed/s3api
40bb214b3f s3api: store a re-copied multipart part as a new attempt so the earlier copy's data is freed (#13216)
* s3api: replace a re-copied multipart part in place so the old part's data is deleted

UploadPartCopy into a part number that already held a part removed the
old part entry with isDeleteData=false and then wrote the new one. The
filer deletes the chunks an entry replaced only when it overwrites that
entry, as UploadPart does, so the old part's chunks were left on the
volume servers with no entry referencing them, for every retried or
repeated copy of a part. The same applied to an empty-range copy.

The part entry is now written over the existing one: the filer deletes
the chunks the new entry does not hold, and the part is never missing
between the two writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: store each UploadPartCopy as a new attempt of the part instead of replacing it

Replacing a copied part in place deletes the replaced part's chunks while
the upload is open. A CompleteMultipartUpload that listed the part before
the replacement builds the object from those chunks and can commit it
after they are deleted. UploadPart never replaces a part: each upload is
a new attempt with its own name (genPartUploadPath).

copyPartLocation now names each copy the same way, and nothing is replaced
or deleted when a part is copied again. Completion already uses the latest
attempt of each part number and frees the data of the others after it
commits, and abort frees them all, so the earlier copy's data is still
reclaimed, without a window against a completion in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: trim the UploadPartCopy attempt comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
2026-12-01 12:32:11 -08:00
..
2024-07-04 11:00:41 -07:00

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. Add EncodingType element for ListBucketResult in AmazonS3.xsd
3. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd
4. Remove empty Grantee struct in s3api_xsd_generated.go
5. Remove xmlns: sed s'/http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\ //' s3api_xsd_generated.go