-
Notifications
You must be signed in to change notification settings - Fork 526
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-12611. Snapshot creation is removing extra keys from AOS's DB #8094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch @hemantk-12 Changes look good to me.
@@ -499,8 +498,7 @@ private static void deleteKeysFromDelDirTableInSnapshotScope( | |||
String bucketName, BatchOperation batchOperation) throws IOException { | |||
|
|||
// Range delete start key (inclusive) | |||
final String keyPrefix = getOzonePathKeyForFso(omMetadataManager, | |||
volumeName, bucketName); | |||
final String keyPrefix = omMetadataManager.getBucketKeyPrefixFSO(volumeName, bucketName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should eventually move all fo these to KeyManager class eventually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will do this as part of GC refactoring fixes
Thanks for the patch, just wondering what does AOS stands for? I saw it in snapshot-related patches, but I'm still not sure what it means. Thanks in advance. |
AOS stands for Active Object Storage (and AFS stands for Active File System). |
Thank you for working on the patch @hemantk-12 and thank you @ivandika3 for reviewing the patch. We can merge this patch given it is quite straightforward and create a follow up if at all there is some other problem which shouldn't be the case mostly |
Thanks @swamirishi , I have resolved the ticket accordingly. |
What changes were proposed in this pull request?
On snapshot creation, the correct bucket prefix is not used to remove keys from
deletedTable
of Active Object Storage (AOS)’s DB. Prefix does not end with/
(code) which means for snapshot creation on bucket/vol1/buck1
, it will move all the keys belonging to bucket/vol1/buck1
and buckets/vol1/buck1[.*]
. And keys for buckets/vol1/buck1[.*]
will be trapped inside the snapshot and never be reclaimed, causing orphan data blocks becauseKeytDeletingService
andSnapshotDeletingService
use the correct bucket prefix.This change includes:
deletedTable
by using the correct bucket prefix (ending with/
). So thatWhat is the link to the Apache JIRA
HDDS-12611
How was this patch tested?
Existing test for now. Created HDDS-12612 to add through integration tests for HDDS-12611.