HDDS-14735. ComponentVersions should not be compared using int values.#9841
Draft
errose28 wants to merge 16 commits intoapache:HDDS-14496-zdufrom
Draft
HDDS-14735. ComponentVersions should not be compared using int values.#9841errose28 wants to merge 16 commits intoapache:HDDS-14496-zdufrom
errose28 wants to merge 16 commits intoapache:HDDS-14496-zdufrom
Conversation
All serialization and functionality remains identical
Use one method called serialize to get the int version.
* HDDS-14496-zdu: HDDS-14712. Rename DatanodeVersion to HDDSVersion (apache#9822) HDDS-14646. SCM should not close Ratis pipelines on Finalize (apache#9779)
client: CURRENT_VERSION -> CURRENT.serialize() server: CURRENT_VERSION -> SOFTWARE_VERSION
This reverts commit 89fc4ca.
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 since this includes changes from #9832
What changes were proposed in this pull request?
ComponentVersionimplementations now contain the following methods:serialize(from HDDS-14723. Create one common interface for LayoutFeature and ComponentVersion #9832): Should only be called when sending a version over the network or to diskdeserialize: Should only be called when reading a version from the network or diskisSupportedBy: Should be used to check version compatibility between client and server. This also wraps the deserialization.VersionManager#isAllowedto check against apparent version inHDDS-14732
All existing client/server version checks have been migrated to these new methods.
Additionally,
CURRENT_VERSIONhas been renamed toSOFTWARE_VERSIONinHDDSVersionandOzoneManagerVersionto reflect the terminology used in the new versioning system. For nowClientVersioncontinues to useCURRENT_VERSIONto refer to the latest version because clients are stateless and will not have apparent versions. TBD if we standardize this terminology so clients also refer to their latest version asSOFTWARE_VERSIONin the future.Some changes were generated by Cursor under my guidance and review.
What is the link to the Apache JIRA
HDDS-14735
How was this patch tested?
TODO:
isSupportedBymethods added.