Skip to content

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

Development

Successfully merging this pull request may close these issues.

3 participants