aswinshakil opened a new pull request, #5301: URL: https://github.com/apache/ozone/pull/5301
## What changes were proposed in this pull request? The change proposes to add exclusive size for a snapshot. PR #5175 address Reference Size calculation for each Snapshot. I have linked a PDF in the JIRA explaining the design. I have summarized it below for future reference. A Snapshot has 4 size, - Reference Size, it is explained here #5175 - Total Size - Refers to the sum of shared size and exclusive size of the snapshot. This is nothing but the bucket size during snapshot. - Shared Size - Refers to data shared between snapshots. Hence this size can’t be quantified as data held by one snapshot but shared between 2 or more snapshots. - Exclusive Size - Refers to the data held only by that snapshot. ### Calculations: ### Total Size We can get `Total Size` from the bucketInfo `omBucketInfo.getUsedBytes()` in the Snapshot. This gives the total size used by the snapshot. **Note:** This give the size of the bucket **after** replication. ### Shared Size Once we get the Total Size and Exclusive Size we can calculate Shared Size. `Shared Size = Total Size - Exclusive Size` ### Exclusive Size To calculate `Exclusive Size` for current snapshot, Check the next snapshot `deletedTable` if the deleted key is **referenced** in current snapshot and **not referenced** in the previous snapshot then that key is exclusive to the current snapshot. ## Things to do in follow-up PRs - Expand `deletedDirTable` for all the snapshot. - Update the code to accommodate files moved to `deleteTable` and calculate Exclusive size. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-7743 ## How was this patch tested? Added New Unit Test and Integration test. -- 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]
