You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Chung-En Lee (Jira)" <ji...@apache.org> on 2026/08/23 22:55:00 UTC
[jira] [Resolved] (HDDS-16205) Avoid the duplicate list copy in S3MultipartUploadCompleteRequest.getMultipartDataSize
[ https://issues.apache.org/jira/browse/HDDS-16205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chung-En Lee resolved HDDS-16205.
---------------------------------
Resolution: Fixed
> Avoid the duplicate list copy in S3MultipartUploadCompleteRequest.getMultipartDataSize
> --------------------------------------------------------------------------------------
>
> Key: HDDS-16205
> URL: https://issues.apache.org/jira/browse/HDDS-16205
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Meng-Shuan Tsai
> Assignee: Meng-Shuan Tsai
> Priority: Major
> Labels: pull-request-available
>
> In {{S3MultipartUploadCompleteRequest.getMultipartDataSize}}, each MPU part calls {{OmKeyLocationInfoGroup.getLocationList()}} twice: once to {{setPartNumber}} on every block, then again for {{addAll}} into the committed key's location list. {{getLocationList()}} is documented as not O(1); it flatten-copies into a new List each call. The {{OmKeyLocationInfo}} objects are the same references, so the second copy is unnecessary.
> Iterate {{getLocationLists()}} to set part numbers and {{addAll}} each inner list (or keep one {{getLocationList()}} result in a local variable). Behavior unchanged.
> Related: HDDS-16183.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org