peterxcli opened a new pull request, #10183:
URL: https://github.com/apache/ozone/pull/10183

   ## What changes were proposed in this pull request?
   
   Relates to: https://github.com/apache/ozone/pull/10164
   
   This patch broadens the conditional write conflict handling from conditional 
`CompleteMultipartUpload` to the shared conditional write flow used by 
conditional `PutObject` and the existing atomic key rewrite path.
   
   The main change is to split conditional write handling into two phases:
   
   - admission-time validation returns precondition-style failures (`412 
PreconditionFailed`) when the caller's condition is already false, such as an 
existing destination for `If-None-Match: *`, a missing destination for 
`If-Match`, a missing ETag, or an ETag mismatch;
   - commit-time revalidation returns `409 ConditionalRequestConflict` when an 
admitted conditional write loses a concurrent commit race before it becomes 
visible.
   
   Concretely, this patch:
   
   - moves atomic rewrite validation into shared admission and commit helpers;
   - updates conditional `CommitKey` handling, including FSO, so stale admitted 
generations fail with `ATOMIC_WRITE_CONFLICT` at commit time;
   - resolves conditional MPU complete requests at admission and revalidates 
the resolved generation during the serialized complete transaction;
   - maps admitted conditional write conflicts to S3 
`ConditionalRequestConflict` while keeping admission failures as 
`PreconditionFailed`;
   - updates the S3 conditional request design doc and adds unit/integration 
coverage for conditional PUT/rewrite and MPU complete conflict cases.
   
   After a `409 ConditionalRequestConflict`, clients should fetch the latest 
object ETag, start a new write or multipart upload as needed, and retry using a 
condition based on the latest object view.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15167
   
   ## How was this patch tested?
   
   UT/IT
   
   https://github.com/peterxcli/ozone/actions/runs/25326550113
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to