Skip to content

HDDS-15376. Implement new ScmVersionManager.#10367

Draft
errose28 wants to merge 2 commits into
apache:HDDS-14496-zdufrom
errose28:scm-version-manager-core
Draft

HDDS-15376. Implement new ScmVersionManager.#10367
errose28 wants to merge 2 commits into
apache:HDDS-14496-zdufrom
errose28:scm-version-manager-core

Conversation

@errose28
Copy link
Copy Markdown
Contributor

DRAFT Requires #10366 to be merged. This PR contains those changes as well.

What changes were proposed in this pull request?

  • Create a common parent class for OM and SCM version managers RatisBasedVersionManager which contains common code between OM and SCM for finalizing from a Ratis snapshot and parsing version numbers from RocksDB.

  • Move shared HDDSVersion concerns between DatanodeVersionManager and ScmVersionManager to a new utility class HDDSVersionUtils and remove HDDSVersionManager.

    • ScmVersionManager shared more code with OMVersionManager for ratis related concerns than DatanodeVersionManager for HDDSVersion usage. Therefore HDDSVersion concerns were moved to this util class to allow ScmVersionManager and OMVersionManager to both extend RatisBasedVersionManager.
  • Switch SCM upgrade actions to use OzoneStorageContainerManager as the upgrade action arg.

    • This is the interface implemented by StorageContainerManager and ReconStorageContainerManagerFacade. The more generic type is required since Recon and SCM's node managers will both need to instantiate an ScmVersionManager instance.
    • SCMUpgradeFinalizationContext will be removed in a follow-up PR. This makes SCM's upgrade actions consistent with OM and Datanode which do not have dedicated context objects passed to their upgrade actions.
  • Add unit tests for ScmVersionManager which cover the same cases as existing tests for OM and Datanode version managers.

  • This PR does not connect ScmVersionManager to production code. That will be done in a follow-up change. RaitsBasedVersionManager is connected to production code through OMVersionManager since OM has already been switched to the new versioning framework.

What is the link to the Apache JIRA

HDDS-15376

How was this patch tested?

Unit tests for new ScmVersionManager added. Existing OM finalization tests will cover usage of OMVersionManager + RatisBasedVersionManager.

errose28 and others added 2 commits May 26, 2026 15:16
…inology

Co-authored-by: Cursor <cursoragent@cursor.com>
…ctor OMVersionManager

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label May 26, 2026
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