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

   # Which issue does this PR close?
   
   <!--
   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.
   -->
   
   Closes #6372
   
   # Rationale for this change
   
   <!--
   Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.
   -->
   
   the current FoyerLayer caches entire objects, which is inefficient for large 
files with partial/range reads. this PR adds chunked caching mode to improve 
cache efficiency for large objects by caching fixed-size chunks independently.
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   1. this pr adds a chunked caching mode: when `with_chunk_size()` is set, the 
caching scheme changes to chunked mode. the caching processing logics in 
deleter/writer are disabled in the chunked mode, we can consider to add them 
later in another pr.
   2. refactor `FoyerKey` and `FoyerValue` to enums: with chunked caching 
enabled, besides the chunked data, we also require to cache the metadata about 
each object.
   
   # Are there any user-facing changes?
   
   yes, new API added `FoyerLayer::with_chunk_size(chunk_size: usize)` to 
enable chunked caching mode
   
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the 
`breaking-changes` label.
   -->
   
   # AI Usage Statement
   
   <!--
   If you are using AI tools to build this PR, please include a statement 
specifying the tool and models you are using.
   -->
   
   this PR was developed with assistance from opus4.5, with review by myself.
   


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