Repository navigation
Conversation
OM maintains a bucket's usedBytes, usedNamespace and snapshot usage counters, but bucket create stored whatever the request carried. A client that sends non-zero values leaves a new bucket with usage that does not match its content, which later quota checks and bucket info then report and enforce.
adoroszlai
reviewed
Oct 25, 2026
adoroszlai
left a comment
Contributor
There was a problem hiding this comment.
Thanks @rjgoyln for the patch.
rjgoyln
marked this pull request as ready for review
October 25, 2026 18:14
adoroszlai
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
OM maintains a bucket's
usedBytes,usedNamespaceand snapshot usage counters, but bucket create stored whatever the request carried. The Ozone client,ozone shand S3 Gateway send 0; any other client can create a bucket with usage it does not have, which stays until a quota repair. For example:QUOTA_EXCEEDEDwhen created withusedNamespaceatquotaInNamespace;ozone sh bucket inforeports the injected usage.Clearing the counters in
preExecuteputs 0 into the Ratis log, so the apply step is unchanged and old and new OMs agree during an upgrade. This is the JIRA patch's fix and the bucket counterpart of HDDS-17238 (#11720).testLinkedBucketResolutionseeded its source bucket's usage through bucket create, so it now writes that bucket to the table directly.What is the link to the Apache JIRA?
https://issues.apache.org/jira/browse/HDDS-17239
How was this patch tested?
TestOMBucketCreateRequestcase fails on master.TestBucketManagerImplpass (97 tests).Generated-by: Claude Code (Opus 5.5)