Skip to content

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

Draft
errose28 wants to merge 7 commits into
apache:HDDS-14496-zdufrom
errose28:dn-assigns-current-version
Draft

HDDS-16154. Datanode should assign DatanodeDetails#currentVersion based on its apparent version#11006
errose28 wants to merge 7 commits into
apache:HDDS-14496-zdufrom
errose28:dn-assigns-current-version

Conversation

@errose28

@errose28 errose28 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?

@errose28 errose28 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
Contributor Author

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
errose28 requested a review from dombizita August 19, 2026 19:28
@errose28

Copy link
Copy Markdown
Contributor Author

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zdu Pull 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