You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Deep Singh <de...@gmail.com> on 2021/03/29 17:59:09 UTC

Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.


Bugs: ATLAS-4195
    https://issues.apache.org/jira/browse/ATLAS-4195


Repository: atlas


Description
-------

When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 

This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityComparator.java d962385c2 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 8208d11c2 


Diff: https://reviews.apache.org/r/73258/diff/1/


Testing
-------

Manual testing was done.


Thanks,

Deep Singh


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Nikhil Bonte <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222847
-----------------------------------------------------------


Fix it, then Ship it!





repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java
Lines 47 (patched)
<https://reviews.apache.org/r/73258/#comment312009>

    DSLQueriesTest.class -> DifferentialAuditsTest.class


- Nikhil Bonte


On April 22, 2021, 9:10 a.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated April 22, 2021, 9:10 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
>   repository/src/test/resources/json/entities/db01.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/2/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> Unit test Added.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222858
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Line 839 (original), 839 (patched)
<https://reviews.apache.org/r/73258/#comment312014>

    instead of adding 'false' to existing methods, make the implementation false implicitly if not specified and make it explicit only for true. (this will preserve backward compatability for existing usage of methods)


- Sarath Subramanian


On April 23, 2021, 6:59 a.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated April 23, 2021, 6:59 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
>   repository/src/test/resources/json/entities/db01.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/3/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> Unit test Added.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222868
-----------------------------------------------------------


Ship it!




Ship It!

- Sarath Subramanian


On April 26, 2021, 9:35 a.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated April 26, 2021, 9:35 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
>   repository/src/test/resources/json/entities/db01.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/4/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> Unit test Added.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Deep Singh <de...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/
-----------------------------------------------------------

(Updated April 26, 2021, 4:35 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.


Changes
-------

Accomodated Sarath's suggestions.


Bugs: ATLAS-4195
    https://issues.apache.org/jira/browse/ATLAS-4195


Repository: atlas


Description
-------

When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 

This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
  repository/src/test/resources/json/entities/db01.json PRE-CREATION 
  repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
  repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 


Diff: https://reviews.apache.org/r/73258/diff/4/

Changes: https://reviews.apache.org/r/73258/diff/3-4/


Testing
-------

Manual testing was done.
Unit test Added.


Thanks,

Deep Singh


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Deep Singh <de...@gmail.com>.

> On April 23, 2021, 10:20 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
> > Lines 1188 (patched)
> > <https://reviews.apache.org/r/73258/diff/3/?file=2249065#file2249065line1188>
> >
> >     nit: remove extra indentation for if statement.
> >     
> >     if we are ignoring mapping deleted elements, rename 
> >     ignoreInactive => ignoreDeleted
> >     
> >     e.g.
> >     
> >     if (ignoreDeleted && GraphHelper.getStatus((AtlasEdge) element) == AtlasEntity.Status.DELETED) {
> >                     continue;
> >                 }

I have fixed the indentation. 
There are 3 possible states 'Active', 'Deleted', and 'Perged'. We are not ignoring just deleted elements but purged elements as well, therefore its ignore-inactive.


- Deep


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222857
-----------------------------------------------------------


On April 23, 2021, 1:59 p.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated April 23, 2021, 1:59 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
>   repository/src/test/resources/json/entities/db01.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/3/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> Unit test Added.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222857
-----------------------------------------------------------


Fix it, then Ship it!





repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 1188 (patched)
<https://reviews.apache.org/r/73258/#comment312012>

    nit: remove extra indentation for if statement.
    
    if we are ignoring mapping deleted elements, rename 
    ignoreInactive => ignoreDeleted
    
    e.g.
    
    if (ignoreDeleted && GraphHelper.getStatus((AtlasEdge) element) == AtlasEntity.Status.DELETED) {
                    continue;
                }



repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 1341 (patched)
<https://reviews.apache.org/r/73258/#comment312013>

    getVertexAttributeIgnoreInactive => getVertexAttributeIgnoreDeleted


- Sarath Subramanian


On April 23, 2021, 6:59 a.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated April 23, 2021, 6:59 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
>   repository/src/test/resources/json/entities/db01.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
>   repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/3/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> Unit test Added.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Deep Singh <de...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/
-----------------------------------------------------------

(Updated April 23, 2021, 1:59 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.


Changes
-------

Fixed Nikhil's Comment.


Bugs: ATLAS-4195
    https://issues.apache.org/jira/browse/ATLAS-4195


Repository: atlas


Description
-------

When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 

This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
  repository/src/test/resources/json/entities/db01.json PRE-CREATION 
  repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
  repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 


Diff: https://reviews.apache.org/r/73258/diff/3/

Changes: https://reviews.apache.org/r/73258/diff/2-3/


Testing
-------

Manual testing was done.
Unit test Added.


Thanks,

Deep Singh


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Deep Singh <de...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/
-----------------------------------------------------------

(Updated April 22, 2021, 3:40 a.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nikhil Bonte, and Sarath Subramanian.


Changes
-------

Added Unit Test


Bugs: ATLAS-4195
    https://issues.apache.org/jira/browse/ATLAS-4195


Repository: atlas


Description
-------

When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 

This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java c13392000 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b79002334 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v2/DifferentialAuditsTest.java PRE-CREATION 
  repository/src/test/resources/json/entities/db01.json PRE-CREATION 
  repository/src/test/resources/json/entities/tbl01-2cols.json PRE-CREATION 
  repository/src/test/resources/json/entities/tbl01.json PRE-CREATION 


Diff: https://reviews.apache.org/r/73258/diff/2/

Changes: https://reviews.apache.org/r/73258/diff/1-2/


Testing (updated)
-------

Manual testing was done.
Unit test Added.


Thanks,

Deep Singh


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Nikhil Bonte <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222825
-----------------------------------------------------------



Started a pre-commit - https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/497/

- Nikhil Bonte


On March 29, 2021, 11:29 p.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated March 29, 2021, 11:29 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityComparator.java d962385c2 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 8208d11c2 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/1/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>


Re: Review Request 73258: ATLAS-4195: [Atlas: Audits] 2 entries are created in audits when "replace columns" command is executed in hive

Posted by Nikhil Bonte <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73258/#review222842
-----------------------------------------------------------


Ship it!




Code looks good to me.
Going ahead, I think it will be good to have UTs around this scenario.

- Nikhil Bonte


On March 29, 2021, 11:29 p.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73258/
> -----------------------------------------------------------
> 
> (Updated March 29, 2021, 11:29 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4195
>     https://issues.apache.org/jira/browse/ATLAS-4195
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When columns for certain table are deleted or replaced, in graph we mark the table relationship with columns(replaced or deleted) as inactive. When shuch a table's definition is sent by Hivehook in some event(may be as refered entity), an update audit is created for the table (irrespective of differential audit feature being enableld or disabled). 
> 
> This is because in entity comparator, where we compare relationships of stored entity with the relationships of incoming refered table entity, we do not ignore the inactive relationships of stored entity. This was because mapVertexToArray method of EntityGraphRetriever did not have the capability to ignore AtlasEdges having inactive status.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityComparator.java d962385c2 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 8208d11c2 
> 
> 
> Diff: https://reviews.apache.org/r/73258/diff/1/
> 
> 
> Testing
> -------
> 
> Manual testing was done.
> 
> 
> Thanks,
> 
> Deep Singh
> 
>