Skip to content

HDDS-17204. Call getBlocksLatestVersionOnly() once in ofs/o3fs getFileBlockLocations - #11655

Open
iprithv wants to merge 1 commit into
apache:masterfrom
iprithv:HDDS-17204
Open

iprithv wants to merge 1 commit into
apache:masterfrom
iprithv:HDDS-17204

Conversation

@iprithv

@iprithv iprithv commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

getFileBlockLocations was calling getBlocksLatestVersionOnly() twice. That method always copies the list, so we were allocating twice. Call it once and reuse the result.

What is the link to the Apache JIRA

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

How was this patch tested?

https://github.com/iprithv/ozone/actions/runs/39538086875

Signed-off-by: prithvi <prithvisivasankar@gmail.com>
@github-actions github-actions Bot added the ofs label Oct 21, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants