Skip to content

Conversation

@Galsza
Copy link
Contributor

@Galsza Galsza commented Feb 7, 2024

What changes were proposed in this pull request?

In OMRequestTestUtils the createOmKeyInfo was repeated a lot of times with minor changes instead of using a builder pattern. Here those usages are eliminated and only 2 of them remains.

The two methods only differ in 1 parameter because the setter setOmKeyLocationInfos is actually an addAll method that doesn't overwrite the previous values and there could be unforeseen bugs storing multiple OmKeyLocationInfos with the same version number.

Another small refactor is that instead of using replication type and factor together they are combined into replicationconfig now.

HDDS-10266

How was this patch tested?

No functional change was created for production code, all tests have passed in ci run:
https://github.com/Galsza/ozone/actions/runs/7800629334/job/21280738076

@Galsza
Copy link
Contributor Author

Galsza commented Feb 7, 2024

@adoroszlai Please take a look

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 @Galsza for the patch, and posting multiple commits for easier review.

@adoroszlai adoroszlai added code-cleanup Changes that aim to make code better, without changing functionality. test labels Feb 7, 2024
@adoroszlai adoroszlai requested a review from fapifta February 7, 2024 21:42
@adoroszlai adoroszlai merged commit 06399b5 into apache:master Feb 8, 2024
swamirishi added a commit to swamirishi/ozone that referenced this pull request Dec 3, 2025
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. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants