> On Jan. 10, 2021, 6:29 a.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
> > Lines 975 (patched)
> > <https://reviews.apache.org/r/73115/diff/2/?file=2243958#file2243958line975>
> >
> > with this change we are deleting all outgoing edges for an entity (the
> > edges can be a composite, aggregation or association relationship).
> >
> > When a hive table is deleted the edge between table and db is not
> > deleted (since it is not a composite relationship).
> >
> > Instead of deleting all outgoing edges, delete only composite
> > relationship edges.
Hi Sarath,
Here the relationship between the hive_table and hive_db is "Aggregation"
Also, here we are not deleting all the outgoing edges.
This patch only deletes the Outgoing-Edge in following condition:
Here the Vertex at the other end of the edge (inVertex) is retrieved and we
check status of that vertex.
If inVertexStatus == DELETED Then only we are sending this edge for soft delete.
AtlasVertex inVertex = outEdge.getInVertex();
AtlasEntity.Status inVertexStatus = GraphHelper.getStatus(inVertex);
if (isProceed && inVertexStatus == DELETED && isRelationshipEdge(outEdge)) {
LOG.info("Relationship Edge to be deleted: " + outEdge.getLabel());
deleteRelationship(outEdge);
}
- Mandar
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73115/#review222427
-----------------------------------------------------------
On Jan. 7, 2021, 12:42 p.m., Mandar Ambawane wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73115/
> -----------------------------------------------------------
>
> (Updated Jan. 7, 2021, 12:42 p.m.)
>
>
> Review request for atlas, Ashutosh Mestry, Jayendra Parab, Madhan Neethiraj,
> Nixon Rodrigues, and Sarath Subramanian.
>
>
> Bugs: ATLAS-4069
> https://issues.apache.org/jira/browse/ATLAS-4069
>
>
> Repository: atlas
>
>
> Description
> -------
>
> In method DeleteHandlerV1.deleteVertex()
> Currently code fetches only Incoming edges of the Vertex to be deleted.
>
> This patch does the following
>
> 1. Fetches all the Outgoing edges of the Vertex.
> 2. Iterates on each edge and then fetches the Vertex on the other side of the
> edge (InVertex)
> 3. It checks the status of that particular vertex.
> 4. If that vertex is already deleted then only the current edge goes for soft
> deletion.
>
>
> Diffs
> -----
>
>
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
> 7b2e2d3
>
>
> Diff: https://reviews.apache.org/r/73115/diff/2/
>
>
> Testing
> -------
>
> Manual Testing is done.
>
> PreCommit:
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/291/console
>
>
> Thanks,
>
> Mandar Ambawane
>
>