Skip to content

Conversation

@sadanand48
Copy link
Contributor

@sadanand48 sadanand48 commented Mar 29, 2023

What changes were proposed in this pull request?

Provide API for snapDiff from OFS.

The main change here is to reuseorg.apache.hadoop.hdfs.protocol.SnapshotDiffReporti.e
org.apache.hadoop.ozone.snapshot.SnapshotDiffReport will extend org.apache.hadoop.hdfs.protocol.SnapshotDiffReport .

Distcp makes use of getFS().getSnapshotDiffReport() which expects this return type. Using this also reduces some code duplication.

What is the link to the Apache JIRA

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

How was this patch tested?

Unit tests

@sadanand48 sadanand48 changed the title HDDS-7789. Provide API for snapDiff from OFS. HDDS-7789. [Snapshot] Provide API for snapDiff from OFS. Mar 29, 2023
@sadanand48 sadanand48 marked this pull request as ready for review March 29, 2023 13:55
@aswinshakil aswinshakil added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Mar 29, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

@sadanand48 - if deleting this temp snapshot throws exception, is there a possibility of building such temp snapshots in disk ?

Copy link
Contributor Author

@sadanand48 sadanand48 Apr 17, 2023

Choose a reason for hiding this comment

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

Yes thats a good point, there is a snapshot deleting task that cares care of cleaning up the deleted snapshots, we could add handling there to delete these type of snapshots if present. I will create a separate jira for this.
cc @smengcl

Copy link
Contributor

@prashantpogde prashantpogde Apr 24, 2023

Choose a reason for hiding this comment

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

Temp snapshots should not be part of Garbage collection on their own. We need to have a separate service to issue deletes on the temporary snapshots. This can be a separate Jira and a separte PR.
I have filed https://issues.apache.org/jira/browse/HDDS-8483 to track this.

Copy link
Contributor

@prashantpogde prashantpogde left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks Sadanand

@prashantpogde prashantpogde merged commit 8d15d5b into apache:master Apr 24, 2023
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.

4 participants