chihsuan opened a new pull request, #11216: URL: https://github.com/apache/ozone/pull/11216
## What changes were proposed in this pull request? OM request handlers can modify bucket usage directly in the cache before the request finishes. If a later step fails, the changed usage remains in memory even though it is not persisted. This patch changes the update flow to read a copy → modify it → publish it when the changes will be persisted: - Add `getBucketInfoForUpdate()` and use it in key, directory, purge, and S3 multipart handlers that update bucket usage. - Publish usage for successful operations, including accepted deletions in a partial-delete response. - For expired multipart upload cleanup, accumulate changes on one copy per bucket and hold all affected bucket write locks until publication. The main review points are whether each handler publishes the copy at the correct point and holds the bucket write lock throughout the read-modify-publish sequence. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16161 ## How was this patch tested? - Related OM unit tests passed with JDK 21. - Checkstyle passed. - Latest test edits have not been rerun. Generated-by: Claude Code (Opus 5) -- 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]
