Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-1950

S3 MPU part-list call fails if there are no parts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.5.0
    • S3

    Description

      If an S3 multipart upload is created but no part is upload the part list can't be called because it throws HTTP 500:

      Create an MPU:

      aws s3api --endpoint http://localhost:9999 create-multipart-upload --bucket=docker --key=testkeu                                         
      {
          "Bucket": "docker",
          "Key": "testkeu",
          "UploadId": "85343e71-4c16-4a75-bb55-01f56a9339b2-102592678478217234"
      }
      

      List the parts:

      aws s3api --endpoint http://localhost:9999 list-parts  --bucket=docker --key=testkeu --upload-id=85343e71-4c16-4a75-bb55-01f56a9339b2-102592678478217234
      

      It throws an exception on the server side, because in the KeyManagerImpl.listParts the ReplicationType is retrieved from the first part:

              HddsProtos.ReplicationType replicationType =
                  partKeyInfoMap.firstEntry().getValue().getPartKeyInfo().getType();
      

      Which is not yet available in this use case.

      Attachments

        Issue Links

          Activity

            People

              elek Marton Elek
              elek Marton Elek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h