siddhantsangwan opened a new pull request, #8663: URL: https://github.com/apache/ozone/pull/8663
## What changes were proposed in this pull request? When finding a container for a block, the SCM needs to allocate a new container if the existing containers don't match requirements. Currently, the SCM just creates a new container without checking if the Datanodes in that particular pipeline have enough disk space (5 GB) for the new container. This pull request adds a check for both Ratis and EC flows. The check happens at a single place in `ContainerManagerImpl`. If the SCM is unable to allocate a new container then a different pipeline needs to be tried - code to handle this already exists. The logic for the check itself already exists in `SCMCommonPlacementPolicy#hasEnoughSpace` and I reuse that here. This existing logic has interesting behaviour for one particular case - it returns false if the exact amount of space is available. For example if the required space is 5 GB, and one datanode has exactly 5 GB, the method will return false. It seems like a defensive way of handling this corner case of disks being close to full. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-12468 ## How was this patch tested? Added unit tests. Ready for review, draft while waiting for CI - https://github.com/siddhantsangwan/ozone/actions/runs/15757908756/job/44418185632 -- 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]
