jojochuang commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2302467469
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java:
##########
@@ -227,9 +228,14 @@ public static BasicOmKeyInfo getFromProtobuf(BasicKeyInfo
basicKeyInfo,
basicKeyInfo.getFactor(),
basicKeyInfo.getEcReplicationConfig()))
.setETag(basicKeyInfo.getETag())
- .setIsFile(!keyName.endsWith("/"))
.setOwnerName(basicKeyInfo.getOwnerName());
+ if (basicKeyInfo.hasIsFile()) {
+ builder.setIsFile(basicKeyInfo.getIsFile());
+ } else {
+ builder.setIsFile(!keyName.endsWith("/"));
Review Comment:
The keyName of a dir in a FSO bucket is guaranteed to have a trailing slash
because of KeyManagerImpl.getOmKeyInfoFSO().
Same for OBS and Legacy buckets in KeyManagerImpl.getOzoneFileStatus(). So
this is good.
--
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]