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

   ## What changes were proposed in this pull request?
   
   OM maintains a volume's `refCount` and `usedNamespace`, but volume create 
stored whatever the request's `VolumeInfo` carried, and nothing recomputes them 
later. The Ozone client and `ozone sh` send 0, but a request from any other 
client can leave:
   
   - an empty volume that cannot be deleted (`VOLUME_IS_REFERENCED`), from a 
non-zero `refCount`;
   - an empty volume that rejects its first bucket (`QUOTA_EXCEEDED`), from 
`usedNamespace` at `quotaInNamespace`.
   
   Clearing both in `preExecute` puts 0 into the Ratis log, so the apply step 
is unchanged and OMs on old and new versions agree during an upgrade. This is 
the fix proposed in the JIRA patch.
   
   ## What is the link to the Apache JIRA?
   
   https://issues.apache.org/jira/browse/HDDS-17238
   
   ## How was this patch tested?
   
   - The new `TestOMVolumeCreateRequest` case fails on master, and again with 
only `clearRefCount()` applied, so it covers both counters.
   - Volume, tenant create/delete and bucket create suites pass (95 tests).
   
   Generated-by: Claude Code (Opus 5.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]

Reply via email to