[ 
https://issues.apache.org/jira/browse/HDDS-16204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chung-En Lee resolved HDDS-16204.
---------------------------------
    Resolution: Fixed

> Avoid the per-group list copy in ContainerToKeyMapping.getContainers
> --------------------------------------------------------------------
>
>                 Key: HDDS-16204
>                 URL: https://issues.apache.org/jira/browse/HDDS-16204
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Meng-Shuan Tsai
>            Assignee: Meng-Shuan Tsai
>            Priority: Major
>              Labels: pull-request-available
>
> {{ContainerToKeyMapping.getContainers}} ({{ozone debug om 
> container-key-mapping}}) only checks whether a key's blocks fall in the 
> requested container IDs, but it calls 
> {{OmKeyLocationInfoGroup.getLocationList()}} for every version group. That 
> accessor is documented as not O(1); it flatten-copies into a new List. 
> {{getLocationLists()}} returns {{locationVersionMap.values()}} with no copy.
> The method does not keep the flattened list; it adds matching container IDs 
> to a HashSet. Iterate {{getLocationLists()}} instead. 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