Skip to content

Conversation

@hemantk-12
Copy link
Contributor

What changes were proposed in this pull request?

Issue is that at final stage of snapshot purge we update the snapshot chain and next global & path level snapshots in DB. When we update next global and path level snapshots in DB, it doesn’t not update the cache. SnapshotInfo read happens from the cache. When causes that test failures mentioned in HDDS-8665.

This change contains two main change.

  1. Snapshot Info to implement CopyObject.
  2. Move out SnapshotChain update form OMSnapshotPurgeResponse to OMSnapshotPurgeRequest.

What is the link to the Apache JIRA

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

How was this patch tested?

Existing unit tests.

Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

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

Structurally tha patch looks good to me.

@aswinshakil pls take a look. see if the chain operations are still consistent w/ the patch.

@smengcl smengcl requested a review from aswinshakil August 18, 2023 20:18
Copy link
Member

@aswinshakil aswinshakil left a comment

Choose a reason for hiding this comment

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

Thank you for finding this issue and putting up the patch @hemantk-12 . Changes look good to me. Pending CI

@aswinshakil aswinshakil added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Aug 18, 2023

updateSnapshotInfoAndCache(nextSnapshot, omMetadataManager,
trxnLogIndex, updatedSnapInfos, true);
updateSnapshotChainAndCache(omMetadataManager, fromSnapshot,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a possibility that snapshot chain may get corrupted because of batch operation.
Created jira to revisit it: https://issues.apache.org/jira/browse/HDDS-9198

@smengcl smengcl merged commit fcf5b17 into apache:master Aug 23, 2023
@smengcl
Copy link
Contributor

smengcl commented Aug 23, 2023

Thanks @hemantk-12 for the fix. Thanks @szetszwo for raising the issue. Thanks @aswinshakil for reviewing this.

@szetszwo
Copy link
Contributor

@hemantk-12 , @smengcl , thanks a lot for fixing this!

smengcl added a commit to smengcl/hadoop-ozone that referenced this pull request Aug 29, 2023
jojochuang pushed a commit to jojochuang/ozone that referenced this pull request Oct 24, 2023
…ved out snapshot chain update form OMSnapshotPurgeResponse (apache#5201)

(cherry picked from commit fcf5b17)
Change-Id: I6df1b15926a10034a9d68f226b932392c1c67e9e
@hemantk-12 hemantk-12 deleted the HDDS-8665 branch October 28, 2024 18:40
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