Skip to content

HDDS-10202. OmMetadataManagerImpl creates new S3Batcher for each operation - #6088

Merged
adoroszlai merged 2 commits into
apache:masterfrom
adoroszlai:HDDS-10202
Jan 25, 2024
Merged

HDDS-10202. OmMetadataManagerImpl creates new S3Batcher for each operation#6088
adoroszlai merged 2 commits into
apache:masterfrom
adoroszlai:HDDS-10202

Conversation

@adoroszlai

Copy link
Copy Markdown
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

@adoroszlaiadoroszlai self-assigned this Jan 24, 2024
@adoroszlai

Copy link
Copy Markdown
ContributorAuthor

@Pochatkin please review

@Pochatkin

Copy link
Copy Markdown
Contributor

@adoroszlai LGTM. Thanks for fix my mistake.

@swamirishiswamirishi 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.

@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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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.

@swamirishiswamirishi 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.

LGTM. Thanks for the patch @adoroszlai

@adoroszlai
adoroszlai merged commit 73f0194 into apache:masterJan 25, 2024
@adoroszlai
adoroszlai deleted the HDDS-10202 branch January 25, 2024 21:08
@adoroszlai

Copy link
Copy Markdown
ContributorAuthor

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 freeto 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

@adoroszlai@Pochatkin@swamirishi