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 57EF4200CCA for ; Wed, 19 Jul 2017 09:55:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56511161C7E; Wed, 19 Jul 2017 07:55:50 +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 9B957161B68 for ; Wed, 19 Jul 2017 09:55:49 +0200 (CEST) Received: (qmail 43657 invoked by uid 500); 19 Jul 2017 07:55:48 -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 43645 invoked by uid 99); 19 Jul 2017 07:55:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2017 07:55:47 +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 56E39C004A; Wed, 19 Jul 2017 07:55:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ZhZWeLLqdlxm; Wed, 19 Jul 2017 07:55:46 +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 84C6860E0A; Wed, 19 Jul 2017 07:55:32 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C8F1DE0280; Wed, 19 Jul 2017 07:55:31 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 57F19C4002E; Wed, 19 Jul 2017 07:55:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1704406104165361968==" MIME-Version: 1.0 Subject: Re: Review Request 60954: ATLAS-1948: Addressed Case Where Export Order List Did Not Add Process Guids At the End In All Cases From: Madhan Neethiraj To: Madhan Neethiraj Cc: Ashutosh Mestry , atlas Date: Wed, 19 Jul 2017 07:55:30 -0000 Message-ID: <20170719075530.20503.98964@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Madhan Neethiraj X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60954/ X-Sender: Madhan Neethiraj X-ReviewBoard-ShipIt: 1 References: <20170719045631.11148.5592@reviews-vm2.apache.org> In-Reply-To: <20170719045631.11148.5592@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: repository/src/test/resources/ctas.zip Reply-To: Madhan Neethiraj X-ReviewRequest-Repository: atlas archived-at: Wed, 19 Jul 2017 07:55:50 -0000 --===============1704406104165361968== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60954/#review180906 ----------------------------------------------------------- Fix it, then Ship it! repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java Line 176 (original), 217 (patched) "resp" is not used outside try {}. Consider moving it inside. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java Lines 229 (patched) { } repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java Lines 241 (patched) - "ATLAS-400-00-021" ==> AtlasErrorCode.INVALID_OBJECT_ID.getErrorCode() - { } - Madhan Neethiraj On July 19, 2017, 4:56 a.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60954/ > ----------------------------------------------------------- > > (Updated July 19, 2017, 4:56 a.m.) > > > Review request for atlas and Madhan Neethiraj. > > > Bugs: ATLAS-1948 > https://issues.apache.org/jira/browse/ATLAS-1948 > > > Repository: atlas > > > Description > ------- > > **Background & Analysis** > Please see [ATLAS-1948](https://issues.apache.org/jira/browse/ATLAS-1948) for scenario details. > > _Root Cause_ > A case where lineage links 2 separate databases, the order of entity creation had process entities inserted between the 2 database entities. This caused process entities not to be created correctly. > > _Side Effect_ > An export with the above problem would result in process entities not getting created, thereby causing entire Import operation to be aborted with "entitiy id" not found error. > > **Implementation** > > _Export API_ > The export operation was addressed to maintain the process entitities to be created after all the other entities are created. > > This is a low-impact fix. > > _Import API_ > The import operation now maintains a separated list of failed entities. These entities are attempted to be imporated once all the non-process entities are imported. > > This was achieved by implementing a _EntityImportStreamWithResidualList_. This private class accepts the _EntityImportStream_ and _List_ as 2 parameters. The _List_ has guids of entities that failed during regular import process. Once all the entities from the _EntitiyImportStream_ are exhausted, this list gets processed. > > > Diffs > ----- > > repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java 8f45e9fd > repository/src/main/java/org/apache/atlas/repository/impexp/ZipSource.java edb816fc > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 5ea4ff20 > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java de8e7ef3 > repository/src/test/resources/ctas.zip PRE-CREATION > > > Diff: https://reviews.apache.org/r/60954/diff/1/ > > > Testing > ------- > > **Unit tests** > > Additional unit tests for that uses this test case. > > **Functional test** > > Regular tests cases. > > > Thanks, > > Ashutosh Mestry > > --===============1704406104165361968==--