ivandika3 opened a new pull request, #5214:
URL: https://github.com/apache/ozone/pull/5214
## What changes were proposed in this pull request?
Currently OpenKeyCleanupService deletes all the open keys in the
openKeyTable regardless whether the open keys are MPU-related or not. This
might cause orphan MPU in MultipartInfoTable, since to abort the MultipartInfo,
we need to check openKeyTable for MPU-related open keys, which will fail if the
open keys are already deleted.
We need to exclude the incomplete MPU open keys in getExpiredOpenKeys so
they are not deleted. We can use `isMultipartKey` flag set in the incomplete
MPU open key info and exclude them from being deleted. However, prior to
HDDS-9017, `isMultipartKey` flag is always set to false, so we need to handle
this case. Here are the cases considered:
1. For MPU open keys with `isMultipartKey` flag set to true
- We can skip it straight, without further checks
2. For MPU open keys with `isMultipartKey` flag set to false (prior to
HDDS-9017)
- Step 1 (fast check): extract `uploadId` from the MPU open key's db key
and validate its structure, returning false if `uploadId `does not conform to
the correct structure. Most non-MPU open keys will return false in this check,
with possibility for false positives which will be handled in step 2.
- Step 2 (MPU table check): from the `uploadId` we build the MPU db key
and check the `multipartInfoTable` for such key. If it exists in the
`multipartInfoTable`, it means that it is an incomplete MPU keys, which should
be excluded from `getExpiredOpenKeys`
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9098
## How was this patch tested?
Unit tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]