Skip to content

HDDS-16214. Avoid per-group list copies in KeyManagerImpl read paths - #11078

Open
dino2895 wants to merge 1 commit into
apache:masterfrom
dino2895:HDDS-16214
Open

HDDS-16214. Avoid per-group list copies in KeyManagerImpl read paths#11078
dino2895 wants to merge 1 commit into
apache:masterfrom
dino2895:HDDS-16214

Conversation

@dino2895

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Avoid creating flattened location list copies in the following KeyManagerImpl read paths:

  • Block token generation
  • Datanode sorting
  • Container ID extraction

These paths now iterate getLocationLists() directly while preserving the existing behavior.

What is the link to the Apache Jira?

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

How was this patch tested?

  • mvn -pl :ozone-manager -am clean test -Dtest=TestKeyManagerUnit#listStatus -Dsurefire.failIfNoSpecifiedTests=false -DskipShade -DskipRecon -DskipDocs
  • ./hadoop-ozone/dev-support/checks/checkstyle.sh

Copilot AI lite review requested due to automatic review settings August 21, 2026 14:55

Copilot AI 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.

Pull request overview

This PR optimizes KeyManagerImpl read paths by avoiding temporary flattened location-list copies.

Changes:

  • Iterates grouped locations directly for block token generation and datanode sorting.
  • Uses nested traversal for container ID extraction.
  • Preserves existing behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

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.

3 participants