Xuanwo opened a new pull request, #9090:
URL: https://github.com/apache/opendal/pull/9090

   # Which issue does this PR close?
   
   Refs #7521 (OSS portion of Phase 5).
   
   # Rationale for this change
   
   OSS previously ignored the copy chunk size and always issued `CopyObject`. 
An explicit chunk size now allows applications to copy an object in server-side 
parts and consume progress through `Copier`.
   
   # What changes are included in this PR?
   
   - Reuse OpenDAL's multipart copier for OSS `UploadPartCopy`. Clamp the 
requested chunk size to OSS's supported part sizes, and check the part count 
before starting the upload.
   - Use the ETag from `HeadObject` as a source precondition on each part. A 
source change during copying returns `Conflict`. The copier can abort the 
upload without replacing the destination.
   - Carry source metadata, including `Content-Language`, and source tags into 
`InitiateMultipartUpload`. OSS can omit the tag count for untagged objects and 
callers without tag-read access, so eligible multipart copies read tags unless 
HEAD reports zero. When OSS denies the tag read, use `CopyObject` and let OSS 
apply its native authorization and tag-copy behavior.
   
   ## Real-service verification
   
   On the existing Aliyun OSS test fixture, both `CopyObject` and the multipart 
copier produced a Standard destination from a readable IA source. The multipart 
copier sent two `UploadPartCopy` requests for 100 KiB and a one-byte tail. 
Readback bytes, tags and `Content-Language` matched the single-request copy.
   
   The fixture also exercised a stale source ETag, explicit abort after 
progress, and upload removal via `ListParts`. A transport-injected 403 
exercised the fallback to real `CopyObject` before initiation. The fixture 
policy itself was unchanged, so the run does not establish what OSS permits 
under a restricted RAM policy.
   
   # Are there any user-facing changes?
   
   OSS advertises multipart copy and accepts a chunk size for segmented copies. 
Default copies still use `CopyObject`. To preserve tags on the multipart path, 
the caller needs permission to read source tags and, for a tagged destination, 
to set tags during initiation. An explicit chunk is best-effort when OSS denies 
tag reads and OpenDAL falls back to `CopyObject`.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - **Harness:** pi | **Model:** GPT-6.2-Astra | **Effort:** high | **Role:** 
Scoped the OSS change and coordinated independent review.
   - **Harness:** pi | **Model:** GPT-6.2-Sol | **Effort:** xhigh | **Role:** 
Implemented and revised the OSS copier, ran real OSS probes and local Rust 
checks, and updated this description.
   - **Harness:** pi | **Model:** SWE-2 | **Effort:** high | **Role:** 
Independently reviewed the initial and revised candidates, including the live 
metadata and tag comparisons.
   - **Harness:** pi | **Model:** Gemini 4 Neon | **Effort:** high | **Role:** 
Drafted the initial PR description.
   - **Assumptions and unknowns:** Real OSS verification used readable IA and 
Standard objects in one test bucket. It did not exercise versioned buckets, 
archive classes, maximum part sizes or counts, restricted RAM policies, or an 
explicit zero tag count in the HEAD response.
   


-- 
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]

Reply via email to