Gargi-jais11 opened a new pull request, #11659:
URL: https://github.com/apache/ozone/pull/11659

   ## What changes were proposed in this pull request?
   When `KeyValueContainer.create` reserves space on a volume but fails with an 
unchecked exception (for example NullPointerException from a missing Schema V3 
dbParentDir), **handleCreateContainer** only released that reservation on 
`StorageContainerException`. Committed bytes on the volume stayed inflated 
until datanode restart.
   
   **Fix:**
   Release reserved space in a finally block when the container was not added 
to `ContainerSet. releaseCommitSpace() ` is unchanged and avoid double-release 
on success or when nothing was reserved.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-17026
   
   ## How was this patch tested?
   Added new tests in `TestKeyValueHandler` -: 
`testCreateContainerReleasesSpaceOnUncheckedFailure` and 
`testCreateContainerKeepsSpaceOfCreatedContainer`.
   
   Generated with Specula (Claude 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