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

   # Which issue does this PR close?
   
   None. This fixes a gap left by #8451, which only skipped the cache-hit path 
for conditional reads.
   
   # Rationale for this change
   
   `FoyerLayer` checks the cache for a conditional read and then falls through 
to `get_or_fetch` on a miss. `get_or_fetch` deduplicates concurrent fills, so a 
conditional read can be combined with an unconditional fill:
   
   - A conditional read that leads a fill makes an unconditional read that 
joins it fail with `ConditionNotMatch`, even though the unconditional read has 
no precondition.
   - A conditional read that joins an unconditional fill can receive data whose 
precondition was never evaluated.
   
   The first case is covered by 
`test_unconditional_read_does_not_join_conditional_fill`, which fails with 
`ConditionNotMatch` on the unconditional read before this change.
   
   # What changes are included in this PR?
   
   - `FullReader::read_full_object` bypasses both the cache hit and 
`get_or_fetch` for reads with any precondition, delegating to the origin with 
the original `OpRead` args.
   - The fill path now only receives non-conditional reads, so its derived 
`OpStat` only carries `version`.
   - Documentation now states that conditional reads bypass the cache and never 
populate it.
   - Tests cover cold-cache, warm-cache, matching, in-flight unconditional 
fill, and in-flight conditional fill cases.
   
   # Are there any user-facing changes?
   
   Conditional reads now always go to the service instead of using cached data 
or joining a cache fill. This preserves precondition semantics; the tradeoff is 
that a conditional read does not populate the cache.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: pi coding agent in T3 Code
   - Model: DeepSeek (`group/deepseek`)
   - Effort: max
   - Role: Implemented the fix, added the regression tests, ran formatting, 
clippy, and the foyer layer test suite, and prepared this PR under human 
direction. The accountable human contributor remains responsible for review and 
follow-up.


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