errose28 opened a new pull request, #10367:
URL: https://github.com/apache/ozone/pull/10367
**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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]