Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-10269. Remove duplicate addCacheEntry in OMDirectoryCreateRequest#getAllParentInfo #6144

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

ivandika3
Copy link
Contributor

@ivandika3 ivandika3 commented Feb 1, 2024

What changes were proposed in this pull request?

In OMDirectoryCreateRequest#getAllParentInfo, there is an unnecessary call to add cache entry for the missing parent directory info.

omMetadataManager.getKeyTable(BucketLayout.DEFAULT).addCacheEntry(
    omMetadataManager.getOzoneKey(
        volumeName, bucketName, parentKeyInfo.getKeyName()),
    parentKeyInfo, trxnLogIndex); 

Although it is already added later in OMFileRequest#addKeyToTableCacheEntries

As the method name suggest, getAllParentInfo should just return the missing parent info without doing any table operation.

What is the link to the Apache JIRA

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

How was this patch tested?

Existing tests.

Clean CI: https://github.com/ivandika3/ozone/actions/runs/7737930007

@ivandika3 ivandika3 marked this pull request as ready for review February 1, 2024 09:52
Copy link
Contributor

@sadanand48 sadanand48 left a comment

Choose a reason for hiding this comment

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

Thanks @ivandika3 , Good catch, LGTM.

@adoroszlai adoroszlai merged commit 6f507c9 into apache:master Feb 1, 2024
38 of 48 checks passed
@adoroszlai
Copy link
Contributor

Thanks @ivandika3 for the patch, @sadanand48 for the review.

@ivandika3 ivandika3 deleted the HDDS-10269 branch February 2, 2024 01:21
@ivandika3
Copy link
Contributor Author

Thank you @sadanand48 for the review and @adoroszlai for the merge.

adoroszlai pushed a commit to adoroszlai/ozone that referenced this pull request Mar 5, 2024
@ivandika3 ivandika3 self-assigned this Apr 23, 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
3 participants