-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-6506. Introduce OmOpenKeyInfo for getExpiredOpenKeys #3235
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
|
CC @errose28 and @captainzmc for review. |
|
Marking this as WIP to introduce |
errose28
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 for working on this @kaijchen. I agree that splitting the return value out of a string and into an object will be easier to work with later, but could you clarify why we need the client ID and parent ID fields? My understanding is that we would need 4 fields:
- volume name
- bucket name
- key name (regardless of FSO or not)
- Whether key is in open file table or open key table
I think just taking the key name from the open key/file table, sending out via Ratis, and having followers delete the key by that name as it appears in the table should work, as long as they know which table the key came from.
Note that we cannot check the bucket layout type anywhere in the open key cleanup service, since it is a background operation. The original bucket may have been deleted, and a new one created with the same name and different layout, since the service is seeing the key.
|
Thanks for reviewing @errose28. HDDS-6491 shows how this class will be used.
Default key name in the openKeyTable
That's why I also included BucketLayout in |
|
Thanks for the quick reply.
This is correct, but the service is cleaning out the table regardless of the key format. It iterates the correct table, and posts deletions for the keys it finds. With the current implementation, we will find a key, split it into parts, then re-assemble it again later to get the key we need to delete. As long as we know what table we got the key from, we can leave it assembled and still retrieve it again.
Yes, I agree we need this field in the OmOpenKeyInfo, but it is currently set using IMO there should be two methods, maybe with a helper method to handle common code: |
The method can take a |
|
@errose28 Do you think it would be better to return For example: kaijchen/ozone@master...kaijchen:HDDS-6506-dev |
|
Closing this for now. Please refer to #3226. |
What changes were proposed in this pull request?
New class
OmOpenKeyInfowas introduced.Changed the return value of getExpiredOpenKeys from
List<String>toList<OmOpenKeyInfo>.So we don't have to construct
OpenKeyBucketby parsing the open key names.And it enables returning regular keys with FSO keys in the same call.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6506
How was this patch tested?
Unit tests