[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to