Skip to content

HDDS-14467. Expose pending delete bytes/namespace in OzoneBucket.#9708

Draft
sadanand48 wants to merge 3 commits intoapache:masterfrom
sadanand48:HDDS-14467
Draft

HDDS-14467. Expose pending delete bytes/namespace in OzoneBucket.#9708
sadanand48 wants to merge 3 commits intoapache:masterfrom
sadanand48:HDDS-14467

Conversation

@sadanand48
Copy link
Contributor

@sadanand48 sadanand48 commented Feb 4, 2026

What changes were proposed in this pull request?

After HDDS-13756, OzoneBucket.usedBytes is populated from OmBucketInfo.getTotalBucketSpace() (used + snapshotUsed bytes), which makes bucket usage ambiguous after key deletion. This change adds explicit pendingDeleteBytes / pendingDeleteNamespace fields to OzoneBucket to clarify retained bytes (snapshots or pending delete).

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14467

How was this patch tested?

Unit tests

@sadanand48 sadanand48 requested review from smengcl February 4, 2026 10:07
@jojochuang jojochuang added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Feb 5, 2026
Comment on lines 1302 to 1336
@@ -1330,6 +1332,8 @@ public List<OzoneBucket> listBuckets(String volumeName, String bucketPrefix,
.setSourceBucket(bucket.getSourceBucket())
.setUsedBytes(bucket.getTotalBucketSpace())
.setUsedNamespace(bucket.getTotalBucketNamespace())
.setPendingDeleteBytes(bucket.getSnapshotUsedBytes())
.setPendingDeleteNamespace(bucket.getSnapshotUsedNamespace())
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @sadanand48 for the patch.

Let's document the behavior of PendingDeleteBytes / PendingDeleteNamespace

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

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants