You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "errose28 (via GitHub)" <gi...@apache.org> on 2026/04/20 22:16:59 UTC
[PR] HDDS-15063. Switch OM to the new Versioning Framework [ozone]
errose28 opened a new pull request, #10099:
URL: https://github.com/apache/ozone/pull/10099
**Draft since this contains and builds off of #10098**
## What changes were proposed in this pull request?
This completely migrates OM to the new versioning framework. This includes:
- Using `OMVersionManager` instead of `OMLayoutVersionManager` in all places.
- When this was applied to `OMLayoutFeatureAspect`, it exposed a bug where some existing snapshot requests had not applied the annotation to `preExecute` and were checking against a default (always finalized) `OMLayoutVersionManager`. This buggy fallback path has been removed and the annotations moved to their correct spot.
- `OzoneManagerVersion` instead of `OMLayoutFeature` for all new versions
- Finalization flow and upgrade actions controlled by `OMVersionManager` instead of `BasicUpgradeFinalizer`/`OMUpgradeFinalizer` and `DefaultUpgradeFinalizationExecutor`
- Make OM's software version `ZDU`
Unused classes that were specific to OM are removed, but some classes like `BasicUpgradeFinalizer` are still used by HDDS Components which have not been migrated yet.
Note that upgrade actions can still only be bound to `LayoutFeature`s. Because an annotation's field cannot be an interface like `ComponentVersion`, we cannot use the same annotation to bind upgrade actions to layout features and component versions. This does not cause any immediate problems since only existing versions tracked as `LayoutFeature`s have upgrade actions, but will need to be addressed in a follow-up so we can continue to add new upgrade actions.
## What is the link to the Apache JIRA
HDDS-15063
## How was this patch tested?
New functionality within the version framework was unit tested in #10098. In this PR all existing upgrade tests are expected to pass without regression.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-15063. Switch OM to the new Versioning Framework [ozone]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on PR #10099:
URL: https://github.com/apache/ozone/pull/10099#issuecomment-4348025241
Thanks @sodonnel for the review. Merging this into the feature branch so we can continue switching the other components over.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-15063. Switch OM to the new Versioning Framework [ozone]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on code in PR #10099:
URL: https://github.com/apache/ozone/pull/10099#discussion_r3155500582
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotMoveDeletedKeysRequest.java:
##########
@@ -52,6 +52,11 @@ public OMSnapshotMoveDeletedKeysRequest(OMRequest omRequest) {
@Override
@DisallowedUntilLayoutVersion(FILESYSTEM_SNAPSHOT)
+ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
Review Comment:
This change is for this line in the PR description:
>When this was applied to OMLayoutFeatureAspect, it exposed a bug where some existing snapshot requests had not applied the annotation to preExecute and were checking against a default (always finalized) OMLayoutVersionManager. This buggy fallback path has been removed and the annotations moved to their correct spot.
`OMLayoutFeaureAspect` does not have explicit handling for `@DisallowedUntilLayoutVersion` on `validateAndUpdateCache`. This caused it to fall back to `OMLayoutFeaureAspect` line 73 in the original code, which creates a default version manager with no knowledge of the apparent/metadata version. This means the annotation actually did not block anything because the evaluation thought OM was finalized.
I removed this fallback code path when I updated `OMLayoutFeaureAspect` and failing tests exposed this issue. The `preExecute` override here only exists to be annotated. In a future change it would be good to create some sort of test that makes sure the annotations are only put on supported methods.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-15063. Switch OM to the new Versioning Framework [ozone]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 merged PR #10099:
URL: https://github.com/apache/ozone/pull/10099
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-15063. Switch OM to the new Versioning Framework [ozone]
Posted by "sodonnel (via GitHub)" <gi...@apache.org>.
sodonnel commented on code in PR #10099:
URL: https://github.com/apache/ozone/pull/10099#discussion_r3155419210
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotMoveDeletedKeysRequest.java:
##########
@@ -52,6 +52,11 @@ public OMSnapshotMoveDeletedKeysRequest(OMRequest omRequest) {
@Override
@DisallowedUntilLayoutVersion(FILESYSTEM_SNAPSHOT)
+ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
Review Comment:
Why add this override that just calls super?
Also, is the `isallowedUntilLayoutVersion(FILESYSTEM_SNAPSHOT)` intended to be on this new method or the original `validateAndUpdateCache` ?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org