Skip to content

HDDS-14732. Create a new VersionManager for unified component versioning#9897

Draft
errose28 wants to merge 20 commits intoapache:HDDS-14496-zdufrom
errose28:HDDS-14732-version-manager
Draft

HDDS-14732. Create a new VersionManager for unified component versioning#9897
errose28 wants to merge 20 commits intoapache:HDDS-14496-zdufrom
errose28:HDDS-14732-version-manager

Conversation

@errose28
Copy link
Contributor

@errose28 errose28 commented Mar 10, 2026

What changes were proposed in this pull request?

  • Create the ComponentVersionManager class which tracks apparent version, software version, and finalization status using the new unified version framework based around component version.
    • Subclasses for OM and HDDS handle specific initialization requirements based on the serialized version read from disk.
  • Add a nextVersion method to all ComponentVersions which points from the current version to the one immediately following it for use when finalizing.
  • Make HDDSLayoutFeature and OMLayoutFeature's last version's nextVersion implementations point to HDDSVersion#ZDU and OzoneManagerVersion#ZDU respectively to handle the transition from layout feature to component version during finalization.
    • This method means that the same ComponentVersionManager implementation will work whether or not we are finalized for ZDU, because it can depend on the nextVersion call to transparently make the switch when finalizing.

A follow-up change will switch the current upgrade path from using AbstractLayoutVersionManager and its subclasses to the new ComponentVersionManager.

What is the link to the Apache JIRA

HDDS-14732

How was this patch tested?

Draft until all testing is finished

  • Existing tests should pass, since the original LayoutVersionManager is still in use on the upgrade path
  • New unit tests for functional changes to LayoutFeature and ComponentVersion added
  • New unit tests for ComponentVersionManager added

Note: TestOMVersionManager was originally the test suite for OMLayoutVersionManager. It was renamed to TestOMLayoutVersionManager to reflect this. Then a new class TestOMVersionManager was created to test the corresponding new class OMVersionManager. Git does not correctly reflect this, and shows TestOMLayoutVersionManager as a completely new class while OMVersionManager appears to have had almost all content deleted and replaced.

@github-actions github-actions bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Mar 10, 2026
@errose28 errose28 changed the title Hdds 14732 version manager HDDS-14732 Create a new VersionManager for unified component versioning Mar 12, 2026
@errose28 errose28 changed the title HDDS-14732 Create a new VersionManager for unified component versioning HDDS-14732. Create a new VersionManager for unified component versioning Mar 12, 2026
@errose28
Copy link
Contributor Author

@sodonnel @dombizita @octachoron This PR should be ready for review. I've completed a re-review of the changes on my end and the CI is still progressing on my fork. The patch is quite large, but no single file has more than ~150 lines added and it provides the whole picture of how the component version manager uses the changes to the features/versions.

If you think it would be easier to review in smaller parts I can optionally split it into three ~500 line PRs:

  • Changes to the ComponentVersion classes and corresponding tests.
    • This would add the ZDU version later required by the LayoutFeature classes.
    • LayoutFeature#nextVersion would be required by the interface but remain stubbed out until the following PR.
  • Changes to the LayoutFeature classes and corresponding tests.
  • Addition of the new VersionManager and its tests to use the previous changes.

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