Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-6984. [Snapshot] Prevent bucket from being deleted if snapshot exists #4015

Merged
merged 7 commits into from
Jan 17, 2023

Conversation

sadanand48
Copy link
Contributor

What changes were proposed in this pull request?

Prevent bucket from being deleted if snapshot exists

What is the link to the Apache JIRA

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

How was this patch tested?

Unit tests

@sadanand48 sadanand48 added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Nov 30, 2022
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.

Thanks @sadanand48 for the patch. Overall looks good.

@smengcl
Copy link
Contributor

smengcl commented Dec 14, 2022

UT in CI has failed twice in a row so far. Looks related:

Error:  Errors: 
Error:    TestOzoneManagerDoubleBufferWithOMResponse.testDoubleBufferWithMixOfTransactions:173->doMixTransactions:296->deleteBucket:313 » NullPointer
Error:    TestOzoneManagerDoubleBufferWithOMResponse.testDoubleBufferWithMixOfTransactionsParallel:253 » Timeout
Error:    TestOMBucketDeleteRequest.testValidateAndUpdateCache:67 » NullPointer
Error:    TestOMBucketDeleteRequestWithFSO>TestOMBucketDeleteRequest.testValidateAndUpdateCache:67 » NullPointer
Error:    TestOMBucketDeleteRequestWithFSO.testValidateAndUpdateCacheWithFSO:57 » NullPointer
[INFO] 
Error:  Tests run: 634, Failures: 0, Errors: 5, Skipped: 1

https://github.com/apache/ozone/actions/runs/3688005945/jobs/6249324380

https://github.com/apache/ozone/actions/runs/3688005945/jobs/6242294343

@sadanand48
Copy link
Contributor Author

UT in CI has failed twice in a row so far. Looks related

Fixed these.

One more test failure I can see in org.apache.hadoop.ozone.freon.TestOMSnapshotDAG.testDAGReconstruction

java.io.IOException: Snapshot Chain corruption:  previous snapshotID given but no associated snapshot found in snapshot chain: SnapshotID 2454ada9-2134-489f-8b97-d1ecadc80b74
3171	at org.apache.hadoop.ozone.om.SnapshotChainManager.addSnapshotGlobal(SnapshotChainManager.java:81)
3172	at org.apache.hadoop.ozone.om.SnapshotChainManager.addSnapshot(SnapshotChainManager.java:274)
3173	at org.apache.hadoop.ozone.om.SnapshotChainManager.loadFromSnapshotInfoTable(SnapshotChainManager.java:265)
3174	at org.apache.hadoop.ozone.om.SnapshotChainManager.<init>(SnapshotChainManager.java:61)
3175	at org.apache.hadoop.ozone.om.OzoneManager.instantiateServices(OzoneManager.java:731)
3176	at org.apache.hadoop.ozone.om.OzoneManager.restart(OzoneManager.java:1575)
3177	at org.apache.hadoop.ozone.MiniOzoneClusterImpl.restartOzoneManager(MiniOzoneClusterImpl.java:362)
3178	at org.apache.hadoop.ozone.freon.TestOMSnapshotDAG.testDAGReconstruction(TestOMSnapshotDAG.java:257) 

Looks like this needs to be fixed before plugging in SnapshotChainManager code. Reverted the optimisation for this PR. Filed HDDS-7689 for the above error.

@prashantpogde
Copy link
Contributor

prashantpogde commented Jan 9, 2023

@sadanand48 can we close this after resolving conflicts and comments ?

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.

Thank you @sadanand48 for working on this.

@sadanand48 sadanand48 merged commit 52103f2 into apache:HDDS-6517-Snapshot Jan 17, 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
4 participants