Skip to content

HDDS-14729. Address followup items in HDDS-14646#9838

Open
sodonnel wants to merge 5 commits intoapache:HDDS-14496-zdufrom
sodonnel:HDDS-14729
Open

HDDS-14729. Address followup items in HDDS-14646#9838
sodonnel wants to merge 5 commits intoapache:HDDS-14496-zdufrom
sodonnel:HDDS-14729

Conversation

@sodonnel
Copy link
Contributor

What changes were proposed in this pull request?

Address the left over comments from #9779 -

Remove unused methods:
SCMUpgradeFinalizationContext#getConfiguration
SCMUpgradeFinalizationContext#getLayoutVersionManager
SCMUpgradeFinalizationContext#getPipelineManager

Nits in TestHddsUpgradeUtils.java

Note that the change to dsm.getContainer().getContainerSet().containerCount(); cannot be made, as getContainerSet() in this instance doesn't return a set, but an iterator() and there is no count method available.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14729

How was this patch tested?

Existing tests.

@sodonnel sodonnel requested a review from errose28 February 26, 2026 17:03
@github-actions github-actions bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Feb 26, 2026
Copy link
Contributor

@Gargi-jais11 Gargi-jais11 left a comment

Choose a reason for hiding this comment

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

Thanks @sodonnel for the patch. Found few more leftover dead codes.


finalizationManager.buildUpgradeContext(scmNodeManager, pipelineManager,
scmContext);
finalizationManager.buildUpgradeContext(scmNodeManager, scmContext);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: multiple backspaces.

private SCMUpgradeFinalizer upgradeFinalizer;
private SCMUpgradeFinalizationContext context;
private SCMStorageConfig storage;
private OzoneConfiguration conf;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should consider removing conf from Builder ? Since nothing in FinalizationManagerImpl reads or uses it. It’s effectively dead.

The Builder still has:

  • private OzoneConfiguration conf;
  • setConfiguration(OzoneConfiguration configuration)
  • Objects.requireNonNull(conf, "conf == null") in build()
    and corresponding to that StorageContainerManager still calls .setConfiguration(conf) when building the FinalizationManagerImpl.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had removed this in an earlier version I reset and missed it on the second pass. I will remove it.

Comment on lines 199 to 200
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider removing this PipelineManager as it only called in inorder as it is no longer used in SCM finalization (it was removed from the builder upgrade context), so it’s dead code in the test and can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, good point. I have removed it and the tests are passing locally at least.

@errose28
Copy link
Contributor

errose28 commented Feb 27, 2026

Note that the change to dsm.getContainer().getContainerSet().containerCount(); cannot be made, as getContainerSet() in this instance doesn't return a set, but an iterator() and there is no count method available.

Looks like you're referring to dsm.getContainer().getController().getContainers(), which is the call that was originally being used. Switching to dsm.getContainer().getContainerSet().containerCount() does produce an int.

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.

3 participants