[ 
https://issues.apache.org/jira/browse/HDDS-16257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130500#comment-18130500
 ] 

Siyao Meng commented on HDDS-16257:
-----------------------------------

[Jira cleanup 2026-10-22] Resolving as Implemented. The hsync scan streams the 
existing location lists instead of flatten-copying them.

Evidence:
* https://github.com/apache/ozone/pull/11116
* 
https://github.com/apache/ozone/commit/5c70970a7c82eba5d3e93ffadaf17ce428684b59
* 
https://github.com/apache/ozone/blob/bf3829e6c8ac69ae17585585703f91426dcdf6b3/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java#L1521

Feel free to reopen if further work is needed.

> Avoid the flatten-copy in OmMetadataManagerImpl.getExpiredOpenKeys' hsync 
> branch
> --------------------------------------------------------------------------------
>
>                 Key: HDDS-16257
>                 URL: https://issues.apache.org/jira/browse/HDDS-16257
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Meng-Shuan Tsai
>            Assignee: Meng-Shuan Tsai
>            Priority: Major
>              Labels: pull-request-available
>
> In the hsync branch of getExpiredOpenKeys (OpenKeyCleanupService's periodic
> scan, default interval 24h):
> {code:java}
> java.util.Optional.ofNullable(info.getLatestVersionLocations())
>     .map(OmKeyLocationInfoGroup::createLocationList)
>     .map(Collection::stream)
>     .orElseGet(Stream::empty)
>     .map(loc -> loc.getProtobuf(ClientVersion.CURRENT_VERSION))
>     .forEach(keyArgs::addKeyLocations);{code}
> createLocationList() is documented as not O(1); it flatten-copies the
> group's locationVersionMap into a throwaway List that is immediately
> re-streamed once and discarded.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to