Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A1CD6200D44 for ; Mon, 20 Nov 2017 18:16:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A0AE3160BF9; Mon, 20 Nov 2017 17:16:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E8487160C0D for ; Mon, 20 Nov 2017 18:16:04 +0100 (CET) Received: (qmail 52524 invoked by uid 500); 20 Nov 2017 17:16:04 -0000 Mailing-List: contact dev-help@atlas.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.apache.org Delivered-To: mailing list dev@atlas.apache.org Received: (qmail 52513 invoked by uid 99); 20 Nov 2017 17:16:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2017 17:16:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3658BC78C3 for ; Mon, 20 Nov 2017 17:16:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.811 X-Spam-Level: X-Spam-Status: No, score=-99.811 tagged_above=-999 required=6.31 tests=[KB_WAM_FROM_NAME_SINGLEWORD=0.2, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4-8aflDYOVmM for ; Mon, 20 Nov 2017 17:16:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 260F05FCF9 for ; Mon, 20 Nov 2017 17:16:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 63765E0D27 for ; Mon, 20 Nov 2017 17:16:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C8B95240D6 for ; Mon, 20 Nov 2017 17:16:00 +0000 (UTC) Date: Mon, 20 Nov 2017 17:16:00 +0000 (UTC) From: "Graham Wallis (JIRA)" To: dev@atlas.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ATLAS-2262) EntityGraphMapper update semantics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 20 Nov 2017 17:16:05 -0000 [ https://issues.apache.org/jira/browse/ATLAS-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16259502#comment-16259502 ] Graham Wallis commented on ATLAS-2262: -------------------------------------- Updated patch and review following Madhan's review comments. > EntityGraphMapper update semantics > ---------------------------------- > > Key: ATLAS-2262 > URL: https://issues.apache.org/jira/browse/ATLAS-2262 > Project: Atlas > Issue Type: Bug > Reporter: Graham Wallis > Assignee: Graham Wallis > Priority: Minor > Attachments: ATLAS-2262-v2.patch, ATLAS-2262.patch > > > Intermittent failures in AtlasRelationshipStoreV1Test occur during modification of the 'friends' relationships between sample Employee and Manager entities. > The intermittent failures are seen as different numbers of updated entities being reported, which causes the test assertion to fail. The failures are intermittent because they are caused by non-deterministic behaviour during UPDATE of an entity's relationships. The non-determinism is caused by the order in which results are returned by a graph query, although any order should be considered valid. > When built with graph provider titan0, the order of edges returned from the graph is always the same, and the current EntityGraphMapper returns a consistent result. The way it achieves it is slightly odd, with existing edge reuse depending on the position of the edge in the returned list. But with titan0, the behaviour is consistent, and correct. > When using the janus graph provider, the order of edges returned from the graph varies. This is valid behaviour on the part of the graph, but the EntityGraphMapper does not behave the same when the edges are returned in a different order compared to titan0. > There are two levels of problem: The first is accuracy of the returned count of updated entities; the second and in my opinion more important is the semantics of an update operation that presents the same array of entity relationships in an order that is not the same as the order returned by the graph. In my opinion the result of the UPDATE operation should not vary depending on the order of the edges returned by the internal graph query. If the set of related entities presented matches the set already recorded then the existing related entities should be reused, rather than replaced. It is therefore the latter problem that I have been working on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)