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

   # Which issue does this PR close?
   
   Part of #5486.
   
   # Rationale for this change
   
   OpenDAL currently returns `Unsupported` when a lakeFS caller supplies 
`if_match` or `if_none_match` on a read. On lakeFS 1.10.0 and 1.88.0, a 
download with a stale `If-Match` still returned the current object. Both 
servers supplied the current ETag on full and ranged downloads. Checking that 
response lets OpenDAL enforce the condition on the bytes it is about to deliver 
without a separate metadata request.
   
   # What changes are included in this PR?
   
   The reader compares a concrete lakeFS ETag with the download response before 
returning its stream. It accepts the bare checksum returned by `stat` and the 
quoted ETag returned by a download. It forwards `If-None-Match` so servers that 
honor it can avoid sending the body. A matching `If-None-Match` produced HTTP 
304 on 1.88.0 and HTTP 200 with the matching ETag on 1.10.0. Both paths return 
`ConditionNotMatch` to the caller. A conditional HTTP 200 or 206 response 
without an ETag returns `Unexpected`.
   
   Four existing `read_with` and `reader_with` behavior cases passed on each 
version using the lakeFS local blockstore. Additional probes covered ETags 
before and after overwrite, combined conditions, ranges, and missing objects.
   
   # Are there any user-facing changes?
   
   LakeFS users can pass `if_match` and `if_none_match` to `read_with` and 
`reader_with`. The lakeFS service guide and generated capability catalog now 
report this support.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - T3 Code / Pi, `codex/gpt-6.2-sol`, xhigh: implemented conditional reads, 
regenerated the catalog, and verified behavior against lakeFS 1.10.0 and 1.88.0 
with the local blockstore.
   - T3 Code / Pi, `devin/swe-2`, high: independent code review.
   - T3 Code / Pi, `codex/gpt-6.2-astra`, high: coordinated verification and 
checked the final diff and PR description.
   - T3 Code / Pi, `agy-cli/gemini-4-neon`, high: drafted the title and 
description.
   


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