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/23 17:02:00 UTC

[jira] [Created] (HDDS-16255) Avoid the per-group list copy in ContainerMapper.parseOmDB

Meng-Shuan Tsai created HDDS-16255:
--------------------------------------

             Summary: Avoid the per-group list copy in ContainerMapper.parseOmDB
                 Key: HDDS-16255
                 URL: https://issues.apache.org/jira/browse/HDDS-16255
             Project: Apache Ozone
          Issue Type: Sub-task
            Reporter: Meng-Shuan Tsai
            Assignee: Meng-Shuan Tsai


ContainerMapper.parseOmDB iterates every OmKeyLocationInfoGroup of every key in the DEFAULT/non-FSO keyTable and calls createLocationList() on each, only to walk the resulting List once with a for-each and read getBlockID() from each entry:
{code:java}
for (OmKeyLocationInfoGroup keyLocationInfoGroup : keyInfo.getKeyLocationVersions()) {
  List<OmKeyLocationInfo> keyLocationInfo = keyLocationInfoGroup
      .createLocationList();
  for (OmKeyLocationInfo keyLocation : keyLocationInfo) {
    ...
  }
}
{code}
createLocationList() is documented as not O(1); it flatten-copies each
group's locationVersionMap into a throwaway List. The call site scans its
selected keyTable without a per-call batching limit; the aggregate allocation
impact relative to other callers requires measurement.



--
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