HDDS-15549. Recon's INITIAL_VERSION should not have an upgrade action - #10935
Open
errose28 wants to merge 2 commits into
Open
HDDS-15549. Recon's INITIAL_VERSION should not have an upgrade action#10935errose28 wants to merge 2 commits into
errose28 wants to merge 2 commits into
Conversation
errose28
marked this pull request as ready for review
August 4, 2026 17:53
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.
What changes were proposed in this pull request?
The standard in the upgrade framework is that
INITIAL_VERSIONserializes 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 theComponentVersionframework.-1as the in-memory placeholder to represent no version on disk, and thenINITIAL_VERSION= 0 as the first version to introduce the upgrade framework. The creates a conflict with the standard versioning frameworkINITIAL_VERSION, which ran because initialization moved from version -1 to 0.After #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.
What is the link to the Apache JIRA
HDDS-15549
How was this patch tested?
TestInitialConstraintUpgradeActionwas removed since its corresponding action was removed. Of the tests it contained:testExecuteIsIdempotentis already covered by the existing idempotency test inTestReconTaskStatusTableUpgradeActiontestUpgradeAppliesConstraintModificationForAllStatesis a general test of the constraint not specific to any upgrade action. It was moved toTestUnhealthyContainerReplicaMismatchActionwhich exclusively deals with the functionality, although it could optionally be duplicated in every action that updates this constraint.testInsertionWithNullContainerStateandtestDuplicatePrimaryKeyInsertionwere not testing the upgrade action or any Ozone code. They were testing existing SQL functionality of the library, so they were removed.