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

   # Which issue does this PR close?
   
   Follow-up to #8710.
   
   # Rationale for this change
   
   Two cache correctness bugs remain in `FoyerLayer`:
   
   - `Writer::close` consumes its buffer before the underlying close completes. 
If the first close fails and a retry succeeds, the layer caches an empty value 
even though the backend stored the written bytes.
   - Recursive deletes only invalidate the directory's exact cache key. Cached 
descendants remain readable after the backend has deleted them.
   
   # What changes are included in this PR?
   
   - Keep the write buffer intact until the underlying close succeeds, 
preserving it across both errors and cancellation.
   - Clear Foyer's memory and disk cache when closing a deleter that accepted a 
recursive delete. Foyer has exact-key removal but no prefix invalidation, so 
whole-cache clearing is the reliable option that covers nested paths and all 
object versions.
   - Add deterministic regressions for a transient close failure, a cancelled 
close, and recursive-delete prefix boundaries. Existing abort behavior remains 
covered and unchanged.
   
   # Are there any user-facing changes?
   
   A failed or cancelled close can now be retried without caching empty data. 
Recursive deletes no longer serve cached descendants.
   
   Recursive deletes clear the entire cache, including unrelated entries. 
Subsequent reads repopulate eligible entries from the backend.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: Pi coding agent, delegated through T3 Code.
   - Model: `kimi-code-cn/k3.1-pro`.
   - Effort: `max`.
   - Role: Authored the implementation and deterministic regression tests.
   


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