Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Avoid OmMetadataManagerImpl creating new instance of S3Batcher for each S3 secret operation.

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

How was this patch tested?

CI:
https://github.com/adoroszlai/ozone/actions/runs/7643348101

@adoroszlai adoroszlai self-assigned this Jan 24, 2024
@adoroszlai
Copy link
Contributor Author

@Pochatkin please review

@Pochatkin
Copy link
Contributor

@adoroszlai LGTM. Thanks for fix my mistake.

Copy link
Contributor

@swamirishi swamirishi left a comment

Choose a reason for hiding this comment

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

@adoroszlai Thanks for the patch, overall the patch looks good to me. Had a minor nitpicky comment, Otherwise I am fine with the entire change.

private final Map<String, TableCacheMetrics> tableCacheMetricsMap =
new HashMap<>();
private SnapshotChainManager snapshotChainManager;
private final S3Batcher s3Batcher = new S3Batcher() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: How about having this object inside a constructor keeping this in a method like initializeS3Batcher()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are 4 constructors. What is the benefit of duplicating the assignment in all of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Converted the anonymous class to an inner one.

@adoroszlai adoroszlai requested a review from swamirishi January 25, 2024 20:23
Copy link
Contributor

@swamirishi swamirishi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the patch @adoroszlai

@adoroszlai adoroszlai merged commit 73f0194 into apache:master Jan 25, 2024
@adoroszlai adoroszlai deleted the HDDS-10202 branch January 25, 2024 21:08
@adoroszlai
Copy link
Contributor Author

Thanks @Pochatkin, @swamirishi for the review.

Thanks for fix my mistake.

No problem.

adoroszlai added a commit to adoroszlai/ozone that referenced this pull request Feb 21, 2024
adoroszlai added a commit to adoroszlai/ozone that referenced this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants