From 7695be56b05f83f9c1f63f41bc239c917f4293a1 Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Sat, 28 Feb 2026 10:24:15 -0800 Subject: [PATCH] fix: store part checksums at destination path in UploadPartCopy In sidecar mode, the three StoreAttribute/storeChecksums calls after the copy loop were using objPath (the source object path) instead of the destination part's bucket and partPath. This caused checksums and the internal part-crc64nvme to be written under the source object's sidecar directory, making them unresolvable when CompleteMultipartUploadWithCopy tried to retrieve them. All three stores now use *upi.Bucket and partPath, consistent with the etag store directly below them. --- backend/posix/posix.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/posix/posix.go b/backend/posix/posix.go index 242278e1..bc0012c7 100644 --- a/backend/posix/posix.go +++ b/backend/posix/posix.go @@ -3036,7 +3036,7 @@ func (p *Posix) UploadPartCopy(ctx context.Context, upi *s3.UploadPartCopyInput) checksums = s3response.Checksum{} } else { if hashRdr == nil { - err := p.storeChecksums(f.File(), objPath, "", checksums) + err := p.storeChecksums(f.File(), *upi.Bucket, partPath, checksums) if err != nil { return s3response.CopyPartResult{}, fmt.Errorf("store part checksum: %w", err) } @@ -3064,7 +3064,7 @@ func (p *Posix) UploadPartCopy(ctx context.Context, upi *s3.UploadPartCopyInput) checksums.CRC64NVME = &sum } - err := p.storeChecksums(f.File(), objPath, "", checksums) + err := p.storeChecksums(f.File(), *upi.Bucket, partPath, checksums) if err != nil { return s3response.CopyPartResult{}, fmt.Errorf("store part checksum: %w", err) } @@ -3073,7 +3073,7 @@ func (p *Posix) UploadPartCopy(ctx context.Context, upi *s3.UploadPartCopyInput) if crc64nvmeRdr != nil { // store the internal crc64nvme internalCrc64NvmeSum := crc64nvmeRdr.Sum() - err := p.meta.StoreAttribute(f.File(), objPath, "", partCrc64nvme, []byte(internalCrc64NvmeSum)) + err := p.meta.StoreAttribute(f.File(), *upi.Bucket, partPath, partCrc64nvme, []byte(internalCrc64NvmeSum)) if err != nil { return s3response.CopyPartResult{}, fmt.Errorf("store part internal crc64nvme: %w", err) }