Skip to content

HDDS-13545. MutableVolumeSet code cleanup#9755

Merged
adoroszlai merged 3 commits intoapache:masterfrom
ptlrs:HDDS-13545-MutableVolumeSet-code-cleanup
Feb 12, 2026
Merged

HDDS-13545. MutableVolumeSet code cleanup#9755
adoroszlai merged 3 commits intoapache:masterfrom
ptlrs:HDDS-13545-MutableVolumeSet-code-cleanup

Conversation

@ptlrs
Copy link
Contributor

@ptlrs ptlrs commented Feb 12, 2026

What changes were proposed in this pull request?

  • Removed addVolume and removeVolume
  • Updated annotation for getVolumeList
  • Replaced getVolumeMap usage with getVolumeList
  • hasEnoughVolumes uses failedVolumeMap and volumeMap fields directly
  • Removed VolumeStateMap

What is the link to the Apache JIRA

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

How was this patch tested?

CI: https://github.com/ptlrs/ozone/actions/runs/21937724785

@adoroszlai adoroszlai added the code-cleanup Changes that aim to make code better, without changing functionality. label Feb 12, 2026
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @ptlrs for the patch.

ptlrs and others added 2 commits February 12, 2026 00:24
Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
…ozone/container/common/volume/TestStorageVolumeChecker.java

Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
@ptlrs
Copy link
Contributor Author

ptlrs commented Feb 12, 2026

Thanks for the review @adoroszlai. I have committed your suggestions.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @ptlrs for updating the patch.

@adoroszlai adoroszlai marked this pull request as ready for review February 12, 2026 09:29
Copy link
Contributor

@sreejasahithi sreejasahithi left a comment

Choose a reason for hiding this comment

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

Thanks @ptlrs for the patch.
left a minor comment

Comment on lines 170 to 172
// The new volume is in an inconsistent state as the root dir is
// non-empty but the version file does not exist. Add Volume should
// return false.
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 this comment is outdated now after the changes, so needs to be updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's why comments should not duplicate statements (assertFalse in this case)... :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's leave this for follow-up, since it's a test-only change. There can be further cleanup in the test class.

Copy link
Contributor

Choose a reason for hiding this comment

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

Created HDDS-14627.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure.

@adoroszlai adoroszlai merged commit c8813dc into apache:master Feb 12, 2026
56 checks passed
@adoroszlai
Copy link
Contributor

Thanks @ptlrs for the patch, @sreejasahithi, @yandrey321 for the review.

@ptlrs ptlrs deleted the HDDS-13545-MutableVolumeSet-code-cleanup branch February 12, 2026 18:29
@ptlrs
Copy link
Contributor Author

ptlrs commented Feb 12, 2026

Thanks for the reviews @adoroszlai, @sreejasahithi, @yandrey321.

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

Labels

code-cleanup Changes that aim to make code better, without changing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants