sumitagrawl commented on code in PR #8644:
URL: https://github.com/apache/ozone/pull/8644#discussion_r2158029365


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java:
##########
@@ -341,4 +344,16 @@ public static long getPendingDeletionBlocks(ContainerData 
containerData) {
               " not support.");
     }
   }
+
+  public static void assertSpaceAvailability(long containerId, HddsVolume 
volume, int sizeRequested)
+      throws StorageContainerException {
+    final SpaceUsageSource currentUsage = volume.getCurrentUsage();
+    final long spared = volume.getFreeSpaceToSpare(currentUsage.getCapacity());
+
+    if (currentUsage.getAvailable() - spared <= sizeRequested) {

Review Comment:
   updated



-- 
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