[
https://issues.apache.org/jira/browse/HDDS-11532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928315#comment-17928315
]
Peter Lee commented on HDDS-11532:
----------------------------------
I think this can be done by changing upload id to use uuidv7 when generating
https://github.com/peterxcli/ozone/blob/62f06b31f34906903d6020081ec83d2730c186ee/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/util/OMMultipartUploadUtils.java#L43-L45
> Sort multipart uploads on ListMultipartUploads response
> -------------------------------------------------------
>
> Key: HDDS-11532
> URL: https://issues.apache.org/jira/browse/HDDS-11532
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: s3gateway
> Reporter: Ivan Andika
> Assignee: Peter Lee
> Priority: Minor
> Attachments: image-2024-10-05-15-26-03-339.png
>
>
> [https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html]
> !image-2024-10-05-15-26-03-339.png|width=492,height=69!
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]