ashishkumar50 commented on PR #6530:
URL: https://github.com/apache/ozone/pull/6530#issuecomment-2074103380
> I feel the same way as @jojochuang . The code causes this problem is
OMFileRequest#addOpenFileTableCacheEntry, where it set both the KeyName and
FileName in OmKeyInfo. I'm wondering if we can keep the KeyName as full key
name, and FileName as leaf name here?
>
> ```
> if (omFileInfo != null) {
> // New key format for the openFileTable.
> // For example, the user given key path is '/a/b/c/d/e/file1', then
in DB
> // keyName field stores only the leaf node name, which is 'file1'.
> omFileInfo.setKeyName(fileName);
> omFileInfo.setFileName(fileName);
> table.addCacheEntry(dbOpenFileName, omFileInfo, trxnLogIndex);
> } else {
> table.addCacheEntry(dbOpenFileName, trxnLogIndex);
> }
> ```
Yes I also thought the same but comment specifically just above that
mentioned it should store only the leaf. Not sure the background of this why
openFileTable requires only leaf in keyName.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]