[ 
https://issues.apache.org/jira/browse/HDDS-12844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Andika updated HDDS-12844:
-------------------------------
    Description: 
When checking for RENAME diff, it will use the following check

[https://github.com/apache/ozone/blob/c7117dcc1731a5f8a82fc6f06b99bda9cd6e01c0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java#L1373]
{code:java}
             if (!isObjectModified || !Arrays.equals(oldKeyName, newKeyName)) {
                renameDiffs.add(codecRegistry.asRawData(
                    SnapshotDiffReportOzone.getDiffReportEntry(RENAME, oldKey,
                        newKey)));
              } {code}
!isObjectModified || !Arrays.equals(oldKeyName, newKeyName) should be 
!isObjectModified && !Arrays.equals(oldKeyName, newKeyName) - with && instead 
of ||

  was:
When checking for RENAME diff, it will use the following check

[https://github.com/apache/ozone/blob/c7117dcc1731a5f8a82fc6f06b99bda9cd6e01c0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java#L1373]

 
{code:java}
             if (!isObjectModified || !Arrays.equals(oldKeyName, newKeyName)) {
                renameDiffs.add(codecRegistry.asRawData(
                    SnapshotDiffReportOzone.getDiffReportEntry(RENAME, oldKey,
                        newKey)));
              } {code}
`!isObjectModified || !Arrays.equals(oldKeyName, newKeyName)` should be 
`!isObjectModified && !Arrays.equals(oldKeyName, newKeyName)`

 


> Fix wrong condition for RENAME diff
> -----------------------------------
>
>                 Key: HDDS-12844
>                 URL: https://issues.apache.org/jira/browse/HDDS-12844
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Ivan Andika
>            Assignee: Ivan Andika
>            Priority: Major
>
> When checking for RENAME diff, it will use the following check
> [https://github.com/apache/ozone/blob/c7117dcc1731a5f8a82fc6f06b99bda9cd6e01c0/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java#L1373]
> {code:java}
>              if (!isObjectModified || !Arrays.equals(oldKeyName, newKeyName)) 
> {
>                 renameDiffs.add(codecRegistry.asRawData(
>                     SnapshotDiffReportOzone.getDiffReportEntry(RENAME, oldKey,
>                         newKey)));
>               } {code}
> !isObjectModified || !Arrays.equals(oldKeyName, newKeyName) should be 
> !isObjectModified && !Arrays.equals(oldKeyName, newKeyName) - with && instead 
> of ||



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to