> On May 10, 2021, 3:44 p.m., Ashutosh Mestry wrote:
> > Can you please update the jira/review with the error you saw in the log?

Exception seen in the logs while trying to delete the classification is :
```
2021-05-09 01:24:23,250 ERROR - [etp1992550266-179 - 
55d97d73-3c4f-4985-81e2-696b41a3df1e:] ~ graph rollback due to exception  
(GraphTransactionInterceptor:200)
org.apache.atlas.exception.AtlasBaseException: Given type class8 has references
    at 
org.apache.atlas.repository.store.graph.v2.AtlasClassificationDefStoreV2.preDeleteByGuid(AtlasClassificationDefStoreV2.java:313)
    at 
org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.deleteTypesDef(AtlasTypeDefGraphStore.java:587)
    at 
org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.deleteTypeByName(AtlasTypeDefGraphStore.java:713)
    at 
org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore$$FastClassBySpringCGLIB$$5226c80b.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:737)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at 
org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:111)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672)
    at 
org.apache.atlas.repository.store.graph.v2.AtlasTypeDefGraphStoreV2$$EnhancerBySpringCGLIB$$cc451202.deleteTypeByName(<generated>)
    at 
org.apache.atlas.web.rest.TypesREST.deleteAtlasTypeByName(TypesREST.java:478)
    at 
org.apache.atlas.web.rest.TypesREST$$FastClassBySpringCGLIB$$1c2e37c6.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
```


- Jayendra


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


On May 9, 2021, 1:09 p.m., Jayendra Parab wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73341/
> -----------------------------------------------------------
> 
> (Updated May 9, 2021, 1:09 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, 
> Pinal Shah, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4278
>     https://issues.apache.org/jira/browse/ATLAS-4278
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When deferred action is enabled, even after dissociating the tag from all 
> entities the classification vertex created while associating the tag still 
> exists.
> The error given "tag1 has references" is because of the classification vertex 
> created is still present in graphdb.
> 
> When deferred action is disable, at the time of dissociating the tag, the 
> classification vertex is deleted from DeleteHandlerV1.deleteEdgeReference.
> But when the deferred action is enabled, the classification vertex isn't 
> deleted because when DeleteHandlerV1.deleteEdgeReference is invoked, that 
> instance the classification vertex has references to the propagated entities. 
> In the background thread, which executes the dissociating of tags from 
> propagated entities, the classification vertex isn't deleted.
> To resolve this issue, the classification vertex is deleted once the tag is 
> disassoociated from propagated entities.
> 
> 
> Diffs
> -----
> 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
>  02ba5ef8d 
> 
> 
> Diff: https://reviews.apache.org/r/73341/diff/1/
> 
> 
> Testing
> -------
> 
> With deferred action enabled:
> Test 1:
> - Associated a tag to an entity table1 which has lineage like table1 -> 
> process1 -> table2
> - Waited for tag propagation to complete
> - Once tag is propagation is complete, deleted the tag1 from table1
> - Once the tag is removed from all the entities in the lineage above, deleted 
> the tag
> - The tag is deleted properly
> 
> Test 2: 
> - Associated a tag to an entity table1 which has lineage like table1 -> 
> process1 -> table2
> - Waited for tag propagation to complete
> - Once tag is propagation is complete, deleted the tag1 from table1
> - Associated the same tag to an entity table3 which has lineage like table3 
> -> process1 -> table4
> - Once the tag is removed from all the entities in the lineage above, deleted 
> the tag
> - The tag is deleted properly
> 
> 
> Thanks,
> 
> Jayendra Parab
> 
>

Reply via email to