errose28 opened a new pull request, #10935: URL: https://github.com/apache/ozone/pull/10935
## What changes were proposed in this pull request? The standard in the upgrade framework is that `INITIAL_VERSION` serializes to 0 and represents the state before any upgrade framework was introduced, meaning no version is found on disk. -1 is the in-memory serialized value representing an unknown/future version in the `ComponentVersion` framework. - Recon was using `-1` as the in-memory placeholder to represent no version on disk, and then `INITIAL_VERSION` = 0 as the first version to introduce the upgrade framework. The creates a conflict with the standard versioning framework - Recon had an upgrade action tied to `INITIAL_VERSION`, which ran because initialization moved from version -1 to 0. After [#10443](https://github.com/apache/ozone/pull/10443) switched Recon to the new versioning framework, Recon's initialization code now reads no version being present as the initial 0 version. The upgrade action tied to version 0 will not run. To fix this, we can merge version 0's upgrade action into version 1's upgrade action, so it will still run sequentially if upgrading to the current version from an old version before the versioning framework. Note that Recon's upgrade actions have been idempotent since [#10442](https://github.com/apache/ozone/pull/10442). ## What is the link to the Apache JIRA HDDS-15549 ## How was this patch tested? - `TestInitialConstraintUpgradeAction` was removed since its corresponding action was removed. Of the tests it contained: - `testExecuteIsIdempotent` is already covered by the existing idempotency test in `TestReconTaskStatusTableUpgradeAction` - `testUpgradeAppliesConstraintModificationForAllStates` is a general test of the constraint not specific to any upgrade action. It was moved to `TestUnhealthyContainerReplicaMismatchAction` which exclusively deals with the functionality, although it could optionally be duplicated in every action that updates this constraint. - `testInsertionWithNullContainerState` and `testDuplicatePrimaryKeyInsertion` were not testing the upgrade action or any Ozone code. They were testing existing SQL functionality of the library, so they were removed. -- 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]
