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

   ## What changes were proposed in this pull request?
   When a container push includes a negative size (from a source whose 
bytesUsed counter has drifted), the receiving datanode reserved **2 * size**, 
which is negative. That lowered the volume’s committed bytes and was never 
released because release only runs when `spaceToReserve > 0`. SCM and local 
volume selection would have  inflated free space.
   
   **Fixed:**
   `ContainerImporter.getSpaceToReserve` now treats a negative size, or one 
where required replication space would overflow, like a missing size and 
reserves the default replication space (2 * ozone.scm.container.size) instead.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-17025
   
   ## How was this patch tested?
   Confirmed the new test suggested in the jira 
`testInvalidSizeReservesDefaultSpace` failed without the fix and after fix it 
passes.
   
    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