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 EEE18200C05 for ; Mon, 23 Jan 2017 23:09:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ED909160B49; Mon, 23 Jan 2017 22:09:45 +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 417F0160B3C for ; Mon, 23 Jan 2017 23:09:45 +0100 (CET) Received: (qmail 20010 invoked by uid 500); 23 Jan 2017 22:09:44 -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 19999 invoked by uid 99); 23 Jan 2017 22:09:44 -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; Mon, 23 Jan 2017 22:09:44 +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 53C75C129E for ; Mon, 23 Jan 2017 22:09:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.817 X-Spam-Level: X-Spam-Status: No, score=-3.817 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] 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 Nzxdj7uVvM55 for ; Mon, 23 Jan 2017 22:09:41 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 290335F23A for ; Mon, 23 Jan 2017 22:09:41 +0000 (UTC) Received: (qmail 19985 invoked by uid 99); 23 Jan 2017 22:09:40 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2017 22:09:40 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 0834A316CC2; Mon, 23 Jan 2017 22:09:39 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5296210490514846791==" MIME-Version: 1.0 Subject: Re: Review Request 55813: Porting performance and stability changes made in 0.7 branch into master From: Sarath Subramanian To: Madhan Neethiraj Cc: Sarath Subramanian , atlas Date: Mon, 23 Jan 2017 22:09:38 -0000 Message-ID: <20170123220938.13409.40815@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Sarath Subramanian X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/55813/ X-Sender: Sarath Subramanian References: <20170121021912.28415.33400@reviews.apache.org> In-Reply-To: <20170121021912.28415.33400@reviews.apache.org> Reply-To: Sarath Subramanian X-ReviewRequest-Repository: atlas archived-at: Mon, 23 Jan 2017 22:09:46 -0000 --===============5296210490514846791== 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/55813/ ----------------------------------------------------------- (Updated Jan. 23, 2017, 2:09 p.m.) Review request for atlas, Madhan Neethiraj and Suma Shivaprasad. Changes ------- Implemented typeTestExpressionUsingInFilter() and made changes to use Gremlin2ExpressionFactory class Bugs: ATLAS-1403 https://issues.apache.org/jira/browse/ATLAS-1403 Repository: atlas Description ------- Currently DSL uses a fill function during Gremlin Translation to merge results by typeName and superTypeName and fill function loads the resulting vertices in memory. This causes significant memory usage and ATLAS server spends lot of time doing GC instead of useful work resulting in OOO sometimes ( when GC is not able to recover and search queries are run in parallel) The proposal is to replace this with typeName checks along by finding all the subtypes for a given type and using an IN clause in the filter. For eg: Query = Person where (birthday < "1950-01-01T02:35:58.440Z") limit 40 offset 0 Optimized query Gremlin Query = L: {g.V.has("__typeName", T.in, ['Person','Manager']).and(_().has("Person.birthday", T.lt, -631142641560)) [0..<40].toList()} Diffs (updated) ----- repository/src/main/java/org/apache/atlas/discovery/DataSetLineageService.java fd5dba7 repository/src/main/java/org/apache/atlas/discovery/graph/DefaultGraphPersistenceStrategy.java 266f27c repository/src/main/java/org/apache/atlas/discovery/graph/GraphBackedDiscoveryService.java b637f90 repository/src/main/java/org/apache/atlas/gremlin/Gremlin2ExpressionFactory.java 41dc65f repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java 3677544 repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 889236c repository/src/main/scala/org/apache/atlas/query/ClosureQuery.scala daef582 repository/src/main/scala/org/apache/atlas/query/GraphPersistenceStrategies.scala a9dcdff repository/src/main/scala/org/apache/atlas/query/GremlinEvaluator.scala ade4176 repository/src/test/scala/org/apache/atlas/query/GremlinTest2.scala 33513c5 Diff: https://reviews.apache.org/r/55813/diff/ Testing ------- Ran Unit Tests and was successful. Thanks, Sarath Subramanian --===============5296210490514846791==--