You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Meng-Shuan Tsai (Jira)" <ji...@apache.org> on 2026/08/17 18:02:00 UTC

[jira] [Created] (HDDS-16204) Avoid the per-group list copy in ContainerToKeyMapping.getContainers

Meng-Shuan Tsai created HDDS-16204:
--------------------------------------

             Summary: 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: Improvement
            Reporter: Meng-Shuan Tsai
            Assignee: Meng-Shuan Tsai


{{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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org