Skip to content

HDDS-14754. Add ZDU upgrade action to clean up leftover state - #10889

Open
errose28 wants to merge 2 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/zdu-upgrade-action
Open

HDDS-14754. Add ZDU upgrade action to clean up leftover state#10889
errose28 wants to merge 2 commits into
apache:HDDS-14496-zdufrom
errose28:worktree/zdu-upgrade-action

Conversation

@errose28

@errose28 errose28 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

OM Prepare for upgrade will be a no-op once ZDU is supported. There may be leftover state in the DB and VERSION file indicating that the OM was put in prepare mode in the prior version. We should remove this state in an upgrade action tied to OM version 100 (ZDU support) which will run when the OM is finalized. Similarly, SCM will no longer have a finalization-in-progress marker in its DB. This should be completely cleared out by the old version when SCM finishes finalizing, but we can also add an upgrade action to ensure it is removed.

What is the link to the Apache JIRA

HDDS-14754

How was this patch tested?

Unit tests for the upgrade actions were added, but they are difficult to test in a real cluster during the upgrade.

The existing mock upgrade actions for ZDU that were used in testing have been removed since we have concrete actions to test with now.

@errose28
errose28 requested a review from dombizita July 28, 2026 20:07
@errose28 errose28 added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Jul 28, 2026
@errose28
errose28 marked this pull request as ready for review July 29, 2026 00:43

@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, one minor question commented.

Comment on lines +51 to +53
if (!marker.delete()) {
throw new IOException("Failed to delete leftover OM prepare marker file " + marker);
}

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.

I believe this is really unlikely to happen, but this is different from SCM, to throw this exception. If this happens the marker file deletion won't happen until finalization called again? Will the finalization fail?

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.

Ideally OM and SCM should crash if there is an error during finalization. We can't have the ratis group in a mixed finalization state. The existing tests only check that an exception is propagated out of the version manager, but it looks like neither component will actually crash. I'll add this to the PR.

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