HDDS-15374. Switch Recon to the new versioning framework#10443
Draft
errose28 wants to merge 9 commits into
Draft
HDDS-15374. Switch Recon to the new versioning framework#10443errose28 wants to merge 9 commits into
errose28 wants to merge 9 commits into
Conversation
…inology Co-authored-by: Cursor <cursoragent@cursor.com>
…ctor OMVersionManager Co-authored-by: Cursor <cursoragent@cursor.com>
…ization Co-authored-by: Cursor <cursoragent@cursor.com>
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, #10367, #10368, #10370, #10376, and #10437 to be merged. This PR contains those changes as well.
What changes were proposed in this pull request?
Create a new
ReconVersionManagerand corresponding upgrade action provider to manage Recon's versions and finalization. By switching Recon to the same framework as other components, we are able to remove a large amount of custom upgrade code that was previously unique to Recon.Recon currently handles finalization differently than other components and this is unchanged by this PR:
ReconLayoutFeatureclass toReconVersion implements ComponentVersionwith no migration concernsHDDSVersionthe same as SCM and Datanode inside itsNodeManagerimplementation, which is stored in a VERSION file.Existing Issues Fixed
Before this PR, the persisted HDDS version in Recon was never updated, so it would remain at the software version Recon was first initialized in. This just happened to work because Recon's
NodeManagerwas only depending on apparent version (MLV before the switch) for debug logging.The standard in the upgrade framework is that
INITIAL_VERSIONserializes to0, and represents the state before any upgrade framework was introduced, meaning no version is found on disk.-1is 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 = 0as 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-1to0.0version. The upgrade action tied to version0was merged into version1's upgrade action, so it will still run if upgrading to this version from an old version before the versioning framework.Recon previously ran upgrade actions and apparent version increases in the same SQL transaction. This is no longer required after HDDS-15488. Recon upgrade actions should be idempotent #10442 which allows us to use shared
ComponentVersionManagercode for this.What is the link to the Apache JIRA
HDDS-15374
How was this patch tested?
Unit tests for new Recon version manager added.