[ https://issues.apache.org/jira/browse/HDFS-12194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17802480#comment-17802480 ]
Shilun Fan commented on HDFS-12194: ----------------------------------- Bulk update: moved all 3.4.0 non-blocker issues, please move back if it is a blocker. Retarget 3.5.0. > File and Directory metadataEquals() does incorrect comparisons for Features > --------------------------------------------------------------------------- > > Key: HDFS-12194 > URL: https://issues.apache.org/jira/browse/HDFS-12194 > Project: Hadoop HDFS > Issue Type: Bug > Components: snapshots > Affects Versions: 2.8.0 > Reporter: Manoj Govindassamy > Assignee: Manoj Govindassamy > Priority: Major > > When calculating snapshot diff, the metadata comparisons for Files and > Directories are doing object reference equality (==) check instead of the > equals() check. So, a file with the ACL set exactly same as the old one will > still be flagged as changed. > INodeFile and SnapshotCopy #metadataEquals() > {noformat} > @Override > public boolean metadataEquals(INodeFileAttributes other) { > return other != null > && getHeaderLong()== other.getHeaderLong() > && getPermissionLong() == other.getPermissionLong() > && getAclFeature() == other.getAclFeature() > && getXAttrFeature() == other.getXAttrFeature(); > } > {noformat} > INodeDirectory, SnapshotCopy #metadataEquals() > {noformat} > @Override > public boolean metadataEquals(INodeDirectoryAttributes other) { > return other != null > && getQuotaCounts().equals(other.getQuotaCounts()) > && getPermissionLong() == other.getPermissionLong() > && getAclFeature() == other.getAclFeature() > && getXAttrFeature() == other.getXAttrFeature(); > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org