Skip to content

HDDS-16312. SCM needs to choose apparent version for reconcile and reconstruct container commands - #11148

Open
errose28 wants to merge 4 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/version-all-replicate-cmds
Open

HDDS-16312. SCM needs to choose apparent version for reconcile and reconstruct container commands#11148
errose28 wants to merge 4 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/version-all-replicate-cmds

Conversation

@errose28

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

SCM is sending the lowest common apparent version to datanodes on the replication path. It must do the same thing for EC reconstruction and reconciliation so datanodes can execute the commands despite being in different versions. Since there are no incompatible changes on these paths yet, the version will be sent to datanodes but currently nothing reads them.

What is the link to the Apache JIRA

HDDS-16312

How was this patch tested?

Unit tests added

(cherry picked from commit 3ec46b9b4cbac86002f9021217328baa6c3c4eba)
@errose28
errose28 requested review from dombizita and sodonnel August 28, 2026 20:07
@github-actions github-actions Bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Aug 28, 2026

@dombizita dombizita 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, overall looks good to me, there is one copy-paste issue.

for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex source : command.getSources()) {
involved.add(getDatanodeInfo(source.getDnDetails()));
}
for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex target : command.getSources()) {

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.

The second loop shouldn't be the target nodes?

Suggested change
for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex target : command.getSources()) {
for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex target : command.getTargetDatanodes()) {

Maybe worth to add a test case that covers this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed in the last commit. The unit tests were only testing that the lowest version was used when it was a source. I split the EC and replication tests to test the source and target being the lowest separately. Reconciliation sends the same command to all nodes so there is no source/target distinction to test there.

@errose28
errose28 marked this pull request as ready for review September 1, 2026 13:07
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