Skip to content

HDDS-16204. Avoid the per-group list copy in ContainerToKeyMapping.getContainers - #11047

Open
shuan1026 wants to merge 3 commits into
apache:masterfrom
shuan1026:HDDS-16204
Open

HDDS-16204. Avoid the per-group list copy in ContainerToKeyMapping.getContainers#11047
shuan1026 wants to merge 3 commits into
apache:masterfrom
shuan1026:HDDS-16204

Conversation

@shuan1026

@shuan1026 shuan1026 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Swaps getLocationList() for getLocationLists(), which returns the same data as a live, uncopied Collection<List<OmKeyLocationInfo>> view, adding one nested forEach level to walk the inner lists.

Same fix pattern as OMKeyRequest.sumBlockLengths (HDDS-16183) and ContainerEndpoint.getBlocks (HDDS-16202). getLocationLists() itself comes from HDDS-5384.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16204

How was this patch tested?

The following test suite passed (8 tests):

  • TestContainerToKeyMapping

Also ran checkstyle.sh and author.sh successfully.

@shuan1026 shuan1026 changed the title HDDS-16204. Avoid the per-group list copy in ContainerToKeyMapping.ge… HDDS-16204. Avoid the per-group list copy in ContainerToKeyMapping.getContainers Aug 18, 2026

@yandrey321 yandrey321 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chungen0126 chungen0126 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@sarvekshayr

sarvekshayr commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@shuan1026 Please merge latest master branch to fix the integration test faiure - https://github.com/apache/ozone/actions/runs/32148571598/job/95988286946?pr=11047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants