Skip to content

HDDS-14753. Do not prematurely serialize client version - #10936

Merged
errose28 merged 3 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/HDDS-14753-serialization-changes
Aug 13, 2026
Merged

HDDS-14753. Do not prematurely serialize client version#10936
errose28 merged 3 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/HDDS-14753-serialization-changes

Conversation

@errose28

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

In the new versioning framework, the ClientVersion class should be used within the java code, and only delegate to ClientVersion#serialize/deserialize at the translation layers of the client and server. This PR updates existing usage of ClientVersion to follow this practice. The main change was in the protobuf translators for DatanodeDetails, which now take a ClientVersion and call serialize since those methods are already in charge of serialization. This creates a ripple effect to classes that use DatanodeDetails which have been updated to pass it a ClientVersion instead 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

@github-actionsgithub-actionsBot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Aug 3, 2026
@errose28

Copy link
Copy Markdown
ContributorAuthor

cc @octachoron

@errose28errose28 changed the title HDDS-14753. Check if existing translation layers should use int or enum component versionHDDS-14753. Do not prematurely serialize client versionAug 4, 2026
@errose28
errose28 marked this pull request as ready for review August 4, 2026 17:51

@dombizitadombizita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @errose28, looks good to me! Please address the conflicts, the CI failure looks unrelated.

…changes
* HDDS-14496-zdu:
HDDS-15885. SCM should validate software versions of peers before accepting finalize command (apache#10783)
HDDS-15641. SCM should send write pipeline version with DatanodeDetails on block allocation (apache#10878)
@errose28

Copy link
Copy Markdown
ContributorAuthor

Resolved the merge conflicts and did some minor cleanup on top. @dombizita PTAL.

@errose28
errose28 merged commit d782c84 into apache:HDDS-14496-zduAug 13, 2026
88 of 89 checks passed
errose28 added a commit to errose28/ozone that referenced this pull request Aug 13, 2026
* HDDS-14496-zdu:
HDDS-14753. Do not prematurely serialize client version (apache#10936)
HDDS-15885. SCM should validate software versions of peers before accepting finalize command (apache#10783)
HDDS-15641. SCM should send write pipeline version with DatanodeDetails on block allocation (apache#10878)
Conflicts:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/Pipeline.java
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/protocol/TestDatanodeDetails.java
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/StorageContainerLocationProtocolServerSideTranslatorPB.java
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockDataStreamOutput.java
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMRecoverLeaseRequest.java
errose28 added a commit to errose28/ozone that referenced this pull request Aug 17, 2026
* HDDS-14496-zdu:
HDDS-16153. DatanodeDetails should use HDDSVersion instead of int (apache#10994)
HDDS-15549. Recon's INITIAL_VERSION should not have an upgrade action (apache#10935)
HDDS-14753. Do not prematurely serialize client version (apache#10936)
HDDS-15885. SCM should validate software versions of peers before accepting finalize command (apache#10783)
HDDS-15641. SCM should send write pipeline version with DatanodeDetails on block allocation (apache#10878)
Conflicts:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/Pipeline.java
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/protocol/TestDatanodeDetails.java
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/StorageContainerLocationProtocolServerSideTranslatorPB.java
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockDataStreamOutput.java
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMRecoverLeaseRequest.java
errose28 added a commit to errose28/ozone that referenced this pull request Aug 21, 2026
* HDDS-14496-zdu:
HDDS-16154. Datanode should assign DatanodeDetails#currentVersion based on its apparent version (apache#11006)
HDDS-16153. DatanodeDetails should use HDDSVersion instead of int (apache#10994)
HDDS-15549. Recon's INITIAL_VERSION should not have an upgrade action (apache#10935)
HDDS-14753. Do not prematurely serialize client version (apache#10936)
HDDS-15885. SCM should validate software versions of peers before accepting finalize command (apache#10783)
HDDS-15641. SCM should send write pipeline version with DatanodeDetails on block allocation (apache#10878)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zduPull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@errose28@dombizita