-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-2426. Support recover-trash to an existing bucket. #958
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
Conversation
|
Rebased latest master-branch (#954 ) and trigger CI |
|
I'm going to fixing violation. |
|
This violation is not related to the change. |
bshashikant
left a comment
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 @cxorm for working on this. I have started the review and will have a deeper look into it.
@bharatviswa504 , can you plz review this as well?
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.
its better to name it as isTrashEnabled()?
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.
rename as isTrashEnabled()?
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.
can we rename the function shouldDelete() ? the name looks confusing
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.
why do we need to update the cache for both trash and deleted table here?
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.
Ideally, if a key gets deleted from a bucket which is trash enabled, i think we should just add it to the trash table, not the deleted table, otherwise it will lead to having duplicate entries in both trash and delete table. Once the trash interval expires, keys can be moved from trash table to deleted table using a background task which will then be cleaned by the KeyDeleting Service. What do you think?
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.
Thank you @bshashikant for the review.
I'm working on this these days, and I would draw a picture for this question.
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.
Ideally, if a key gets deleted from a bucket which is trash enabled, i think we should just add it to the trash table, not the deleted table, otherwise it will lead to having duplicate entries in both trash and delete table. Once the trash interval expires, keys can be moved from trash table to deleted table using a background task which will then be cleaned by the KeyDeleting Service. What do you think?
Yeah, I agree that we shouldn't have duplicated entries in both and delete table.
This part would be updated .
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.
Let's hold off for now on this. There are some ideas being discussed around this.
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.
Yeah, thanks @bshashikant for the remind.
|
I am going to take it this week. |
|
Rebased latest master-branch (#1109 ) and fixed conflict. |
|
/pending |
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.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
/pending
|
Thank you very much for the patch. I am closing this PR temporarily as there was no activity recently and it is waiting for response from its author. It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time. It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs. If you need ANY help to finish this PR, please contact the community on the mailing list or the slack channel." |
What changes were proposed in this pull request?
This PR composed of changes including:
Proposed fix.
In
OmMetadataManagerImpl#getPendingDeletionKeyswe only check last item in repeatedOmKeyInfo.Cause once the last item is trash-enabled, we keep this key from purging in OM DB.
Using trashTable to track trash.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2426
How was this patch tested?
Add UTs to track the OMTrashRecoverRequest and OMTrashRecoverResponse.