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: [email protected]
For additional commands, e-mail: [email protected]