HDDS-15376. Implement new ScmVersionManager.#10367
Draft
errose28 wants to merge 2 commits into
Draft
Conversation
…inology Co-authored-by: Cursor <cursoragent@cursor.com>
…ctor OMVersionManager Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
RatisBasedVersionManagerwhich contains common code between OM and SCM for finalizing from a Ratis snapshot and parsing version numbers from RocksDB.Move shared
HDDSVersionconcerns betweenDatanodeVersionManagerandScmVersionManagerto a new utility classHDDSVersionUtilsand removeHDDSVersionManager.ScmVersionManagershared more code withOMVersionManagerfor ratis related concerns thanDatanodeVersionManagerforHDDSVersionusage. ThereforeHDDSVersionconcerns were moved to this util class to allowScmVersionManagerandOMVersionManagerto both extendRatisBasedVersionManager.Switch SCM upgrade actions to use
OzoneStorageContainerManageras the upgrade action arg.StorageContainerManagerandReconStorageContainerManagerFacade. The more generic type is required since Recon and SCM's node managers will both need to instantiate anScmVersionManagerinstance.SCMUpgradeFinalizationContextwill 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
ScmVersionManagerwhich cover the same cases as existing tests for OM and Datanode version managers.This PR does not connect
ScmVersionManagerto production code. That will be done in a follow-up change.RaitsBasedVersionManageris connected to production code throughOMVersionManagersince 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
ScmVersionManageradded. Existing OM finalization tests will cover usage ofOMVersionManager+RatisBasedVersionManager.