[
https://issues.apache.org/jira/browse/HDDS-16210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Huang Kuan Hao updated HDDS-16210:
----------------------------------
Issue Type: Improvement (was: Bug)
> Reduce OmKeyLocationInfoGroup.getLocationList() copies in hot paths
> -------------------------------------------------------------------
>
> Key: HDDS-16210
> URL: https://issues.apache.org/jira/browse/HDDS-16210
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Huang Kuan Hao
> Assignee: Huang Kuan Hao
> Priority: Major
>
> OmKeyLocationInfoGroup.getLocationList() is documented as expensive and not
> O(1) — it flatten-copies locationVersionMap into a new List on every call
> (values().stream().flatMap(List::stream).collect(toList())). Following
> HDDS-16183 / HDDS-16202 / HDDS-16204 / HDDS-16205, several call sites still
> treat it as a lightweight getter: allocating a throwaway list only to read
> size(), to iterate once, or once per key across the whole keyspace. This
> umbrella collects the remaining verified sites; each subtask is a
> self-contained, behavior-preserving change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]