[
https://issues.apache.org/jira/browse/HDDS-16202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-16202:
----------------------------------
Labels: pull-request-available (was: )
> Avoid the list copy in ContainerEndpoint.getBlocks
> --------------------------------------------------
>
> Key: HDDS-16202
> URL: https://issues.apache.org/jira/browse/HDDS-16202
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Meng-Shuan Tsai
> Assignee: Meng-Shuan Tsai
> Priority: Major
> Labels: pull-request-available
>
> {{ContainerEndpoint.getBlocks}} only keeps blocks whose containerID matches
> the request, but it calls {{getLocationList()}} and then
> {{{}filter().collect(){}}}, allocating two lists it does not keep.
> {{getLocationList()}} is documented as not O(1); {{getLocationLists()}}
> returns {{locationVersionMap.values()}} with no copy.
> Iterate {{getLocationLists()}} and add matching blocks. Behavior unchanged.
> Related: HDDS-16183 (same pattern in {{{}sumBlockLengths{}}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]