You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ptlrs (via GitHub)" <gi...@apache.org> on 2026/04/24 23:57:10 UTC

[PR] HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource [ozone]

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

   ## What changes were proposed in this pull request?
   Currently, container sizes <= 0 in CachingSpaceUsageSource prevent a few operations from proceeding. 
   We should update the validations to be handled gracefully instead of blocking operations.
   
   
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-15112
   
   
   ## How was this patch tested?
   
   CI: https://github.com/ptlrs/ozone/actions/runs/24917153879


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource [ozone]

Posted by "ptlrs (via GitHub)" <gi...@apache.org>.
ptlrs commented on PR #10130:
URL: https://github.com/apache/ozone/pull/10130#issuecomment-4338649641

   Thanks for the reviews @rnblough @sumitagrawl @errose28 @aryangupta1998 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource [ozone]

Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on code in PR #10130:
URL: https://github.com/apache/ozone/pull/10130#discussion_r3155679178


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/fs/CachingSpaceUsageSource.java:
##########
@@ -120,7 +120,11 @@ public void incrementUsedSpace(long usedSpace) {
     if (usedSpace == 0) {
       return;
     }
-    Preconditions.assertTrue(usedSpace > 0, () -> usedSpace + " < 0");
+    if (usedSpace < 0) {

Review Comment:
   We should have a unit test for these changes in TestCachingSpaceUsageSource.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource [ozone]

Posted by "aryangupta1998 (via GitHub)" <gi...@apache.org>.
aryangupta1998 commented on PR #10130:
URL: https://github.com/apache/ozone/pull/10130#issuecomment-4338640253

   Thanks @errose28, @sumitagrawl, and @rnblough for the reviews!


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource [ozone]

Posted by "aryangupta1998 (via GitHub)" <gi...@apache.org>.
aryangupta1998 merged PR #10130:
URL: https://github.com/apache/ozone/pull/10130


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org