Xuanwo commented on issue #5672:
URL: https://github.com/apache/opendal/issues/5672#issuecomment-7170796260

   For the COS case, can one identity read the source bucket and write to the 
destination bucket, or must the two buckets use separate identities? That 
determines which credentials could authorize a provider-side copy, including 
when the buckets are in different regions.
   
   Today, COS builds the copy request from one operator’s configured bucket. 
`RouteLayer` selects the operator from the source path and sends both paths to 
it. The multipart work in #9093 keeps that scope. [COS request 
construction](https://github.com/apache/opendal/blob/c5f382dbfe/core/services/cos/src/core.rs)
 · [RouteLayer copy 
test](https://github.com/apache/opendal/blob/c5f382dbfe/core/layers/route/src/lib.rs)
   
   If relaying the bytes through the application is acceptable, use 
`source.reader(key).await?.into_stream(..).await?`, pass each buffer from 
`stream.try_next().await?` to the destination writer’s `write(buffer).await?`, 
then `close().await?`. Set any required destination metadata when opening the 
writer. I verified the byte transfer with two independent Memory operators. 
This issue stays open for the server-side case where the application should 
never receive the object bytes.
   
   *AI-generated maintenance comment.*
   


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