[ https://issues.apache.org/jira/browse/ATLAS-991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Kantor updated ATLAS-991: ------------------------------- Attachment: rb49869.patch See https://reviews.apache.org/r/49869/ for changes. > Lower bound checking not always disabled for Entities being deleted > ------------------------------------------------------------------- > > Key: ATLAS-991 > URL: https://issues.apache.org/jira/browse/ATLAS-991 > Project: Atlas > Issue Type: Bug > Reporter: Jeffrey Hagelberg > Assignee: David Kantor > Attachments: rb49869.patch > > > It is often the case multiple entities get deleted at the same time. The > current delete logic does not compute the delete closure up front, so it is > possible for the processing of a particular Entity to trigger a lower bound > violation in an entity that will be deleted but has not been processed yet. > This issue is specific to hard delete. It does not happen when soft delete > is being used. > Here's a simple test that can be added to > GraphBackedMetadataRepositoryDeleteTestBase to reproduce the issue: > {noformat} > @Test > public void testLowerBoundsIgnoredOnDeletedEntities() throws Exception { > > String hrDeptGuid = createHrDeptGraph(); > ITypedReferenceableInstance hrDept = > repositoryService.getEntityDefinition(hrDeptGuid); > Map<String, String> nameGuidMap = getEmployeeNameGuidMap(hrDept); > ITypedReferenceableInstance john = > repositoryService.getEntityDefinition(nameGuidMap.get("John")); > String johnGuid = john.getId()._getId(); > ITypedReferenceableInstance max = > repositoryService.getEntityDefinition(nameGuidMap.get("Max")); > String maxGuid = max.getId()._getId(); > > ITypedReferenceableInstance jane = > repositoryService.getEntityDefinition(nameGuidMap.get("Jane")); > String janeGuid = jane.getId()._getId(); > > //the lower bound constraint on jane.subordinates should not be > enforced since jane is being deleted > deleteEntities(johnGuid, maxGuid, janeGuid); > > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)