Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2169

Delete request fails when hard delete is configured

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1, 1.0.0
    • 0.8.2, 1.0.0
    • None
    • None

    Description

      I'm using Atlas version 0.8.1. When trying to delete an entity by id (DELETE /v2/entity/guid/{guid}), the server throws the following EntityNotFoundException:

      2017-09-22 20:47:25,104 ERROR - [pool-1-thread-5 - a5dca07b-477d-4876-a4a2-9682a1280071:] ~ Exception while getting a typed reference for the entity  (AtlasInstanceConverter:114)
      org.apache.atlas.typesystem.exception.EntityNotFoundException: Could not find entities in the repository with guids: [a9e0c914-8c4d-4377-876e-d03c3e1ca448]
      	at org.apache.atlas.repository.graph.GraphBackedMetadataRepository.getEntityDefinitions(GraphBackedMetadataRepository.java:220)
      	at org.apache.atlas.repository.graph.GraphBackedMetadataRepository.getEntityDefinition(GraphBackedMetadataRepository.java:172)
      	at org.apache.atlas.repository.graph.GraphBackedMetadataRepository$$FastClassBySpringCGLIB$$43a564a2.invoke(<generated>)
      	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669)
      	at org.apache.atlas.repository.graph.GraphBackedMetadataRepository$$EnhancerBySpringCGLIB$$6e37b77a.getEntityDefinition(<generated>)
      	at org.apache.atlas.services.DefaultMetadataService.getEntityDefinition(DefaultMetadataService.java:329)
      	at org.apache.atlas.repository.converters.AtlasInstanceConverter.getITypedReferenceable(AtlasInstanceConverter.java:112)
      	at org.apache.atlas.repository.store.graph.v1.AtlasEntityChangeNotifier.toITypedReferenceable(AtlasEntityChangeNotifier.java:184)
      	at org.apache.atlas.repository.store.graph.v1.AtlasEntityChangeNotifier.notifyListeners(AtlasEntityChangeNotifier.java:158)
      	at org.apache.atlas.repository.store.graph.v1.AtlasEntityChangeNotifier.onEntitiesMutated(AtlasEntityChangeNotifier.java:86)
      	at org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1.deleteById(AtlasEntityStoreV1.java:390)
      	at org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1$$FastClassBySpringCGLIB$$80c00649.invoke(<generated>)
      	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
      	at org.apache.atlas.repository.store.graph.v1.AtlasEntityStoreV1$$EnhancerBySpringCGLIB$$c12a5ccf.deleteById(<generated>)
      	at org.apache.atlas.web.rest.EntityREST.deleteByGuid(EntityREST.java:236)
      

      This bug seems exactly like the issue in ATLAS-931. The API resources look like they were refactored in 0.7 -> 0.8, and I believe that the error handling logic wasn't translated properly.

      The same error is thrown if I try to remove an entity reference from an attribute that contains a list of references to an "ownedRef" entity (E.g. removing a column from a table entity).The exception is thrown, claiming it cannot find the removed column entity in the graph, but the column entity is still retrievable via the REST API (the status remains ACTIVE), and the table entity is not updated.

      Attachments

        1. ATLAS-2169.patch
          5 kB
          Madhan Neethiraj

        Activity

          People

            madhan Madhan Neethiraj
            cparker-civitas Cade Parker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: