HDDS-14753. Do not prematurely serialize client version - #10936
Open
errose28 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
cc @octachoron |
errose28
marked this pull request as ready for review
August 4, 2026 17:51
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?
In the new versioning framework, the
ClientVersionclass should be used within the java code, and only delegate toClientVersion#serialize/deserializeat the translation layers of the client and server. This PR updates existing usage ofClientVersionto follow this practice. The main change was in the protobuf translators forDatanodeDetails, which now take aClientVersionand callserializesince those methods are already in charge of serialization. This creates a ripple effect to classes that useDatanodeDetailswhich have been updated to pass it aClientVersioninstead of serializing the version themselves before passing it in.Many files were touched, but it is a simple substitution that does not amount in a large number of lines changed.
What is the link to the Apache JIRA
HDDS-14753
How was this patch tested?
No functional change. All existing tests should pass. Changes do not affect protobuf/disk/wire protocols