0lai0 opened a new pull request, #6796:
URL: https://github.com/apache/opendal/pull/6796

   # Which issue does this PR close?
   Closes #6521 
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements. You can link an issue to this PR using the GitHub syntax. For 
example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   
   # Rationale for this change
   
   when using write_with().chunk(size), if the buffer is larger than the 
configured chunk size, the data is not split into chunks and the entire buffer 
is written in one call. This defeats the chunk configuration.
   
   # What changes are included in this PR?
   
   - Modified write_inner in core/src/types/operator/operator.rs to check if 
chunk is configured and the buffer exceeds the chunk size.
   - If so, calculate the actual chunk size considering service capabilities 
(min/max limits) using WriteContext::calculate_chunk_size().
   - Split the buffer into chunks of the calculated size before passing to 
Writer.
   - Made WriteContext::calculate_chunk_size() pub(crate) to allow reuse of the 
existing calculation logic.
   
   
   # Are there any user-facing changes?
   


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