Skip to content

Conversation

@aswinshakil
Copy link
Member

What changes were proposed in this pull request?

With #6006, We support snapshot rename operation. Many of the background services sends OMRequest with respect to snapshotTableKey. If there is a rename operation that happens in-between the request, It will fail and the system may be in an undesirable state. In this PR, Instead of using snapshotTableKey we are changing the background services to use snapshotId which remains constant throughout a snapshot's lifetime.

What is the link to the Apache JIRA

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

How was this patch tested?

Existing Tests.

@aswinshakil aswinshakil self-assigned this Feb 29, 2024
@aswinshakil aswinshakil added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Feb 29, 2024
try {
if (fromSnapshot != null) {
if (purgeDirsRequest.hasSnapshotTableKey()) {
throw new OMException("The field snapshotTableKey from PurgeDirectoriesRequest is deprecated." +
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understood the code flow properly, it would fail OM which is not good in this scenario.
Based on OzoneManagerStateMachine#processResponse and https://issues.apache.org/jira/browse/HDDS-10524

May be better to fall back to purgeDirsRequest.getSnapshotTableKey() or throw FILE_NOT_FOUND or something which doesn't fail OM.

We also need to fix this for the snapshot chain as well. Right now it crashes OM if the chain is corrupted. e.g. HDDS-10524

@aswinshakil
Copy link
Member Author

Closing this PR. I will create a different PR for this as the Snapshot code has changed significantly since the PR.

@aswinshakil aswinshakil closed this Oct 2, 2024
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.

2 participants