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

   ## What changes were proposed in this pull request?
   
   OM Create Phase
   Validation is performed within the validateAndUpdateCache method to ensure 
atomicity within the Ratis state machine application.
   
   1. Locking: The OM acquires the write lock for the bucket/key.
   2. Key Lookup: Retrieve the existing key from KeyTable.
   3. Validation:
       - Key Not Found: If the key does not exist, throw KEY_NOT_FOUND (maps to 
S3 412).
       - No ETag Metadata: If the existing key (e.g., uploaded via OFS) does 
not have an ETag property, throw ETAG_NOT_AVAILABLE (maps to S3 412). The 
precondition cannot be evaluated, so we must fail rather than silently proceed.
       - ETag Mismatch: Compare existingKey.ETag with expectedETag. If they do 
not match, throw ETAG_MISMATCH (maps to S3 412).
   4. Extract Generation: If ETag matches, extract existingKey.updateID.
   5. Create Open Key: Create open key entry with expectedDataGeneration = 
existingKey.updateID.
   
   Sorry I forgot to follow the step 4 and 5 in my previous PR 
https://github.com/apache/ozone/pull/9815 ...
   
   ## What is the link to the Apache JIRA
   
   
[issues.apache.org/jira/browse/HDDS-13919](https://issues.apache.org/jira/browse/HDDS-13919)
   
   ## How was this patch tested?
   
   existing 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]


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

Reply via email to