Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-1186 Ozone S3 gateway (phase III)
  3. HDDS-11532

Sort multipart uploads on ListMultipartUploads response

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • s3gateway
    • None

    Description

      https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html

      ListMultipartUploads result enforces sorting order based on key and time (only for general purpose bucket).

      Currently, Ozone "sorts" the result based on the upload ID since the DB key for multipartInfoTable is "/{VOLUME_NAME}/{BUCKET_NAME}/{KEY_NAME}/{OBJECT_ID}" (for LEGACY and OBS bucket). Since the DB key for multipart uploads with the same key has the same prefix "/{VOLUME_NAME}/{BUCKET_NAME}/{KEY_NAME}/", the key-based sorting should be handled (assuming DB keys only contains ASCII characters, see the note at the bottom). Therefore, to enforce the time-based sorting, we can sort the multipart uploads with the same key based on the initiate time. We can also choose to only support this for LEGACY / OBS bucket.

      Note: Currently the StringCodec uses UTF-8 which might be encoded to different number of bytes depending of the character, and since RocksDB only cares about bytes, these might cause some unexpected sorting order. However, AFAIK for ASCII characters, UTF-8 will encoding is always 1 byte, so if the DB key are always ASCII, the key name sorting might hold. 

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: