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

   ## What changes were proposed in this pull request?
   
   `S3MultipartUploadCommitPartRequest.validateAndUpdateCache` publishes the 
new part to the cache — `multipartPartsTable`, or in the legacy layout the 
`multipartInfoTable` entry that carries the part inline — and puts a delete 
marker on the part's open key, all before calling `checkBucketQuotaInBytes`. 
When that check throws `QUOTA_EXCEEDED` the response writes nothing and nothing 
withdraws those entries, so they stay visible until the double buffer has 
flushed the transaction. `applyTransaction` does not wait for that flush, so 
the next request for the same upload can be applied while the rejected part 
still looks committed: an abort or complete reads the parts through the cache 
and releases bytes that were never charged or completes a key over a part whose 
commit failed, and in the legacy layout a later part commit starts from the 
cached entry and writes the rejected part back to `RocksDB`. 
   This PR moves the three cache writes below the quota check, next to the 
bucket usage update that is already published after it, so a rejected commit 
leaves no cache state behind.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16787
   
   ## How was this patch tested?
   
   UT
   


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