[
https://issues.apache.org/jira/browse/HDDS-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Andika updated HDDS-10269:
-------------------------------
Description:
In OMDirectoryCreateRequest#getAllParentInfo, there is an unnecessary call to
add cache entry.
{code:java}
omMetadataManager.getKeyTable(BucketLayout.DEFAULT).addCacheEntry(
omMetadataManager.getOzoneKey(
volumeName, bucketName, parentKeyInfo.getKeyName()),
parentKeyInfo, trxnLogIndex); {code}
Although it is already added later in OMFileRequest#addKeyToTableCacheEntries
As the method names suggest, getAllParentInfo should just return the missing
parent info without doing any table operation.
was:
In OMDirectoryCreateRequest#getAllParentInfo, there is an unnecessary call to
add cache entry.
{code:java}
omMetadataManager.getKeyTable(BucketLayout.DEFAULT).addCacheEntry(
omMetadataManager.getOzoneKey(
volumeName, bucketName, parentKeyInfo.getKeyName()),
parentKeyInfo, trxnLogIndex); {code}
Although it is already added later in OMFileRequest#addKeyToTableCacheEntries
getAllParentInfo should just return the missing parent info without during any
table operation.
> Remove duplicate addCacheEntry in OMDirectoryCreateRequest#getAllParentInfo
> ---------------------------------------------------------------------------
>
> Key: HDDS-10269
> URL: https://issues.apache.org/jira/browse/HDDS-10269
> Project: Apache Ozone
> Issue Type: Bug
> Components: OFS, OM
> Affects Versions: 1.3.0, 1.4.0
> Reporter: Ivan Andika
> Assignee: Ivan Andika
> Priority: Minor
>
> In OMDirectoryCreateRequest#getAllParentInfo, there is an unnecessary call to
> add cache entry.
> {code:java}
> omMetadataManager.getKeyTable(BucketLayout.DEFAULT).addCacheEntry(
> omMetadataManager.getOzoneKey(
> volumeName, bucketName, parentKeyInfo.getKeyName()),
> parentKeyInfo, trxnLogIndex); {code}
> Although it is already added later in OMFileRequest#addKeyToTableCacheEntries
> As the method names suggest, getAllParentInfo should just return the missing
> parent info without doing any table operation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]