Skip to content

HDDS-14723. Create one common interface for LayoutFeature and ComponentVersion#9832

Open
errose28 wants to merge 9 commits intoapache:HDDS-14496-zdufrom
errose28:HDDS-14723-combined-version-interface
Open

HDDS-14723. Create one common interface for LayoutFeature and ComponentVersion#9832
errose28 wants to merge 9 commits intoapache:HDDS-14496-zdufrom
errose28:HDDS-14723-combined-version-interface

Conversation

@errose28
Copy link
Contributor

@errose28 errose28 commented Feb 25, 2026

What changes were proposed in this pull request?

During the migration away from LayoutFeatures to a unified ComponentVersion, there will be a time when we need to initially start Ozone components using LayoutFeature, and when version 100 is finalized, switch to the unified ComponentVersion framework for all versioning. In order to do this, both versioning systems must implement the same interface. ComponentVersion was chosen for this purpose. As part of this change:

  • The Versioned interface was removed. LayoutFeature now extends ComponentVersion directly since all work will be with ComponentVersions going forward.
  • The UpgradeAction interface is moved to its own file outside of LayoutFeature since we will still need it when working with ComponentVersion in ZDU.
  • Indexing LayoutFeatures by their name string is no longer supported. There was never a case where indexing could not be done by version number.
  • All implementations now provide a toString for logging that contains both the enum name and version number, which will help with debugging as we switch to the new system.
  • The duplicate methods to get the actual version number between the ComponentVersion, Versioned, and LayoutFeature interfaces have been consolidated to a single method called serialize.
    • This reflects that this is an opaque value intended for disk/network transfer and should not be compared directly. Later changes may modify existing checks to enforce this practice more strictly.

Note that the large number of file modifications is mostly due to renames. The number of lines changed is not too large.

Most changes were generated by Cursor under my guidance and review.

What is the link to the Apache JIRA

HDDS-14567

How was this patch tested?

  • No functionality has been changed and all existing tests pass on my fork.
  • I ran TestOMUpgradeFinalization and checked the logs to verify the toString changes were printing correctly.

@errose28 errose28 changed the base branch from master to HDDS-14496-zdu February 25, 2026 23:38
@github-actions github-actions bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Feb 25, 2026
* HDDS-14496-zdu:
  HDDS-14712. Rename DatanodeVersion to HDDSVersion (apache#9822)
  HDDS-14646. SCM should not close Ratis pipelines on Finalize (apache#9779)
@errose28 errose28 marked this pull request as ready for review February 26, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant