Skip to content

HDDS-16154. Datanode should assign DatanodeDetails#currentVersion based on its apparent version - #11006

Merged
sodonnel merged 8 commits into
apache:HDDS-14496-zdufrom
errose28:dn-assigns-current-version
Aug 21, 2026
Merged

HDDS-16154. Datanode should assign DatanodeDetails#currentVersion based on its apparent version#11006
sodonnel merged 8 commits into
apache:HDDS-14496-zdufrom
errose28:dn-assigns-current-version

Conversation

@errose28

@errose28errose28 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

DatanodeDetails#currentVersion is passed from Datanodes through SCM to clients to indicate the Datanode's server version. Once ZDU is finalized, this value should be the apparent version of the Datanode instead of a static software version. A new abstract method is added to ComponentVersionManager to handle this and implemented for every component in this PR. On Datanodes, this method is called in the register and heartbeat endpoint tasks to provide SCM with the most up to date current version.

Additionally, DatanodeDetails#currentVersion is currently persisted into the Datanode's datanode.id yaml file, but never used. When Datanodes finalize, the current version they report to clients will increase, and this location will become stale. To keep it from diverging we should stop persisting this value in the datanode.id file.

What is the link to the Apache JIRA

HDDS-16154

How was this patch tested?

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

Copy link
Copy Markdown
ContributorAuthor

Link to relevant comments which I'll fix here:
#11025 (comment)

* 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

Copy link
Copy Markdown
ContributorAuthor

This is ready for review, just leaving as draft until CI on the latest commit goes through my fork. Thanks @ss77892 for the initial comments, they've been addressed here.

@sodonnelsodonnel 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.

LGTM if we get green CI.

@errose28

Copy link
Copy Markdown
ContributorAuthor

Green CI on my fork with the last commit.

@errose28
errose28 marked this pull request as ready for review August 20, 2026 18:39
@errose28
errose28 requested a review from sodonnelAugust 20, 2026 18:39
@sodonnel
sodonnel merged commit 79728a1 into apache:HDDS-14496-zduAug 21, 2026
59 checks passed
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@sodonnel