Skip to content

HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource#10130

Merged
aryangupta1998 merged 2 commits intoapache:masterfrom
ptlrs:HDDS-15112-Allow-containers-of-all-sizes-to-be-imported
Apr 28, 2026
Merged

HDDS-15112. Handle negative space usage values gracefully in CachingSpaceUsageSource#10130
aryangupta1998 merged 2 commits intoapache:masterfrom
ptlrs:HDDS-15112-Allow-containers-of-all-sizes-to-be-imported

Conversation

@ptlrs
Copy link
Copy Markdown
Contributor

@ptlrs ptlrs commented Apr 24, 2026

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

Copy link
Copy Markdown
Contributor

@rnblough rnblough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. We drop the problem of clusters with pre-existing negative usedBytes running afoul of the assert condition, and keep the information via the warn logs.

@ashishkumar50 ashishkumar50 marked this pull request as ready for review April 28, 2026 16:22
Copy link
Copy Markdown
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ptlrs ptlrs requested a review from errose28 April 28, 2026 17:54
Copy link
Copy Markdown
Contributor

@aryangupta1998 aryangupta1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch @ptlrs, LGTM!

@aryangupta1998 aryangupta1998 merged commit b3f4a64 into apache:master Apr 28, 2026
47 checks passed
@aryangupta1998
Copy link
Copy Markdown
Contributor

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

@ptlrs ptlrs deleted the HDDS-15112-Allow-containers-of-all-sizes-to-be-imported branch April 28, 2026 20:02
@ptlrs
Copy link
Copy Markdown
Contributor Author

ptlrs commented Apr 28, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants