ivandika3 opened a new pull request, #5326: URL: https://github.com/apache/ozone/pull/5326
## What changes were proposed in this pull request? While working on the MPU cleanup service, there are possible scenarios that might cause issues when cleaning up / abort incomplete MPUs: 1. Cleaning up / abort MPUs whose bucket has been deleted 2. Cleaning up / abort MPUs whose bucket has just been recreated 3. Cleaning up / abort MPUs whose bucket has changed layout (i.e. delete the original bucket with OBS layout and creating an FSO bucket with the same name) For case 1, the incomplete MPU will not be able to be aborted since S3MultipartUploadAbortRequest will fail when bucket doesn't exist. For case 2, if we abort the newly created bucket, the bucket might end up with negative usedBytes since S3MultipartUploadAbortRequest will substract from the bucket quota. For case 3, if the bucket is change layout from OBS -> FSO, the abort MPU will fail since the MPU open key is located in the openKeyTable, but due to the new FSO bucket layout, it will check openFileTable. Therefore, to resolve above cases, let's have an invariant that "all incomplete MPUs must belongs to an existing bucket" by disallowing bucket deletion until all the MPUs have been aborted. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-9318 ## How was this patch tested? Unit test. -- 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]
