Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-9095 Cleanup expired incomplete MPUs
  3. HDDS-9318

Prevent bucket from being deleted if incomplete MPUs exist

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 1.3.0
    • 1.4.0
    • OM

    Description

      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.

       

      Incomplete multipart uploads are also one of the criteria of bucket being empty: https://repost.aws/knowledge-center/s3-empty-bucket-lifecycle-rule

      Attachments

        Issue Links

          Activity

            People

              ivanandika Ivan Andika
              ivanandika Ivan Andika
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: