Return-Path: X-Original-To: apmail-atlas-dev-archive@minotaur.apache.org Delivered-To: apmail-atlas-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22B4717443 for ; Wed, 9 Dec 2015 14:26:42 +0000 (UTC) Received: (qmail 5469 invoked by uid 500); 9 Dec 2015 14:26:42 -0000 Delivered-To: apmail-atlas-dev-archive@atlas.apache.org Received: (qmail 5420 invoked by uid 500); 9 Dec 2015 14:26:42 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 5407 invoked by uid 99); 9 Dec 2015 14:26:41 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2015 14:26:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8DAB1C0295 for ; Wed, 9 Dec 2015 14:26:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.226 X-Spam-Level: * X-Spam-Status: No, score=1.226 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.554] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7CoWpOMeKlwn for ; Wed, 9 Dec 2015 14:26:40 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 8255D27D7C for ; Wed, 9 Dec 2015 14:26:29 +0000 (UTC) Received: (qmail 2096 invoked by uid 99); 9 Dec 2015 14:25:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2015 14:25:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 388342C1F60 for ; Wed, 9 Dec 2015 14:25:13 +0000 (UTC) Date: Wed, 9 Dec 2015 14:25:13 +0000 (UTC) From: "Suma Shivaprasad (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ATLAS-289) updateEntity does not remove existing edge for multiplicity-one reference MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ATLAS-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Suma Shivaprasad updated ATLAS-289: ----------------------------------- Fix Version/s: (was: trunk) 0.6-incubating > updateEntity does not remove existing edge for multiplicity-one reference > ------------------------------------------------------------------------- > > Key: ATLAS-289 > URL: https://issues.apache.org/jira/browse/ATLAS-289 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.6-incubating > Reporter: David Kantor > Assignee: David Kantor > Labels: patch > Fix For: 0.6-incubating > > Attachments: ATLAS-289-v0.patch, UpdateEntityTest.java > > > updateEntity does not properly update a multiplicity-one non-composite reference, such that the entity appears to not have been updated when it is retrieved after updateEntity is called. > updateEntity is adding an edge from the source vertex to the > new target vertex, but not removing the existing edge that connects the > source to the old target. So after the update completes, the source vertex has 2 edges for this class reference (which violates the upper bound constraint defined for that attribute but that constraint is not enforced). > When the source entity is retrieved after the update, GraphBackedMetadataRepository.GraphToTypedInstanceMapper.mapVertexToClassReference() uses whatever edge is returned first by the iterator to set the reference value. If the first edge is the "old" edge, the returned entity appears to have not been updated as it is referencing the original target entity. -- This message was sent by Atlassian JIRA (v6.3.4#6332)