Skip to content

HDDS-15320. Reduce duplication in OMAllocateBlockRequest OBS/FSO classes#10327

Open
rhalm wants to merge 1 commit into
apache:masterfrom
rhalm:HDDS-15320
Open

HDDS-15320. Reduce duplication in OMAllocateBlockRequest OBS/FSO classes#10327
rhalm wants to merge 1 commit into
apache:masterfrom
rhalm:HDDS-15320

Conversation

@rhalm
Copy link
Copy Markdown

@rhalm rhalm commented May 21, 2026

What changes were proposed in this pull request?

A subtask of HDDS-14873, a refactoring effort to reduce code duplication between OMRequest OBS/FSO pairs. This patch covers the OMAllocateBlockRequest classes.

OMAllocateBlockRequestWithFSO fully overrides validateAndUpdateCache even though most of the logic is identical to the OBS implementation, only differing in key lookup, cache update, and response creation. This PR consolidates the shared logic into a template method in the base class and isolates the differing parts into helper methods.

What is the link to the Apache JIRA

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

How was this patch tested?

No new tests added, existing ones already cover the affected behavioral paths.
CI passed: https://github.com/rhalm/ozone/actions/runs/26234828557

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.

1 participant