Xuanwo opened a new pull request, #9093:
URL: https://github.com/apache/opendal/pull/9093
# Which issue does this PR close?
Refs #7521 (COS portion of Phase 5).
# Rationale for this change
COS previously used `CopyObject` for every copy. Use the provider's
`UploadPartCopy` API to copy objects above the single-request limit and to
honor caller-selected part sizes and concurrency.
# What changes are included in this PR?
- Use the shared `MultipartCopier` for server-side part planning, progress,
completion, and abort. Keep ordinary small copies and `if_not_exists` requests
on `CopyObject`.
- Pass the source ETag to each part request. Read source tags before
initiating the upload and pass them alongside inherited metadata so the
destination preserves the tags that `CopyObject` would copy.
- Validate the COS result element and ETag for each copy operation,
including `CopyObject` used by version restore. Surface embedded COS errors
with their native code and diagnostics. Mark copied-part errors as retryable
for the transient codes Tencent's SDK recognizes, so `RetryLayer` can replay
the same part. The COS adapter reports lost or ambiguous completion responses
as non-retryable errors.
On the existing real Tencent COS fixture, the revised candidate copied a
tagged 1 MiB plus one-byte object with each path. Both destinations matched the
source bytes, tags and `Content-Language`. Single copy returned the destination
ETag, version and modification time. Multipart completion returned the
destination ETag and version. The untagged lifecycle probe exercised two native
`UploadPartCopy` requests, explicit abort after progress, rejection of a
changed source on the second part, historical source-version copy, and
same-path version restore. Both probes removed their object versions. The HTTP
200 embedded-error and lost-response tests use synthetic inputs. The versioned
fixture disables the destination `if_not_exists` capability, so provider-side
conditional copy and the automatic large-object threshold remain outside this
run's coverage.
# Are there any user-facing changes?
COS advertises `copy_can_multi` with a 1 MiB minimum chunk size and a 5 GiB
maximum on 64-bit targets. Native multipart copy needs `cos:GetObjectTagging`
access to the source and reads its tags before opening the destination upload.
`CopyObject` uses COS's native tag inheritance.
# Breaking changes
# AI Usage Statement
- Harness: pi
- Model: Sol
- Effort: xhigh
- Role: Implemented and revised COS multipart copy, added synthetic
response tests, and validated the revised candidate against the existing COS
fixture.
- Harness: pi
- Model: Gemini
- Effort: high
- Role: Independently reviewed the initial implementation and
provider-specific revisions, identified the capability generation failure, and
drafted the PR description.
- Harness: pi
- Model: Astra
- Effort: high
- Role: Coordinated implementation and review, updated the multipart limit
declaration and regenerated the capability catalog, and verified the generator
and COS tests.
- Harness: pi
- Model: SWE-2
- Effort: high
- Role: Independently reviewed the final capability limits and generated
catalog.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]