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 2A3FC200C4C for ; Tue, 4 Apr 2017 10:04:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 28ABB160B90; Tue, 4 Apr 2017 08:04:15 +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 4730D160B81 for ; Tue, 4 Apr 2017 10:04:14 +0200 (CEST) Received: (qmail 72263 invoked by uid 500); 4 Apr 2017 08:04:13 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 72251 invoked by uid 99); 4 Apr 2017 08:04:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2017 08:04:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CCFD71AF8E0 for ; Tue, 4 Apr 2017 08:04:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id adBE4wCFDzZp for ; Tue, 4 Apr 2017 08:04:10 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 3100E5F24C for ; Tue, 4 Apr 2017 08:04:10 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id j90so87852889lfk.2 for ; Tue, 04 Apr 2017 01:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=ybWKVjTZp3Lu1TgAS08y9Pg2YtgavK8r6CD9Yy2E0LU=; b=QVBnwhhyo7ShHoCAhBw8Rk3YHlTvJ+dlU9mWmvnhAAeIWuu4Qe0w+mbTgku8Y22blE wKrq7FjNwjp2FsyYpGhULq9WLUE6pkFY3JTEtrcqD6PO3lpliKotkn0OjMirSgpYI+bY X2K5EldbLwxBfGuzGANWq9vH91dCCNC9FvV/eBM6g7CawBFaNZkzkxuBCVmCi8jaNAlV Fn221dmmMA9v+BYbok2VTKqRJUZ/ZuDU7LdkyoqtTKtjTkgKmQqqTcWgbDHA77o/8dB1 3TwKkb7QMvCIXgWOTbiTjek1WhWFLoD3vGT4PWByC63IDbfwmA/TWw0NE8VXm37cBBDQ vwuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=ybWKVjTZp3Lu1TgAS08y9Pg2YtgavK8r6CD9Yy2E0LU=; b=pCzv5DuxqOfmh663G8QJiL+ViVXvr32m0zwx0nTSwMZ+1HfWo395ntHgeyAOYi+sbH 7tfI56gj6n0ljzWSUE8y+U+QI2kBrBnaTf1Tu7dgt+eIz9w/u9XFyCKupp1Es1sy3nI3 CUXDDp8sPYWiDOCVsTjEiVqf+GTrjcLEGqJkpKE3pvxQNGDRD40fL4W1uIR/IiP8IMkK xsmM3IS/xEI/XzwlU/vA24C4A4V+dP5ZLYeueDWBvB/yCsxr1nnaP8bRpHlePu5yZcZb cntpadQGWd1diFMHhMLoo3DVbrfoZVVXTeyggj1P1Fn1GoITEtu1K0XxghXvqfVBxVjX Jtqg== X-Gm-Message-State: AFeK/H3ihtqwbNE+OA3Zh7Ek/emRYUsjNgTBt9huqJW7eNEcLHbFL+ixkVW8BF9oK9HGzU04hTJz8zkxPVFeHA== X-Received: by 10.25.199.65 with SMTP id x62mr6824151lff.122.1491293048958; Tue, 04 Apr 2017 01:04:08 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.46.22.27 with HTTP; Tue, 4 Apr 2017 01:03:48 -0700 (PDT) In-Reply-To: References: <58E27E03.50601@apache.org> From: Niclas Hedhman Date: Tue, 4 Apr 2017 16:03:48 +0800 X-Google-Sender-Auth: kGx-82mYuqXHrc0XqYsX2YCuaIY Message-ID: Subject: Re: Sorting out issues with Indexing SQL To: dev@polygene.apache.org, stanislav.muhametsin@zest.mail.kapsi.fi Content-Type: multipart/alternative; boundary=94eb2c1a1ee8707378054c52b8b1 archived-at: Tue, 04 Apr 2017 08:04:15 -0000 --94eb2c1a1ee8707378054c52b8b1 Content-Type: text/plain; charset=UTF-8 > Indexing-SQL scans whole application structure on startup to detect all the visible and indexable entity composite types, and if the things changed there, it might cause problems. Oy! Do you remember How/Where is that done? Because the EntityComposite type is added to the EntityDescriptor and must be done that way (or the Entity object with instanceof) and not be checking the Java interfaces. That could be the root of many problems. The other change is that identity is now a type and not String, and somewhere that might cause problems. Rewrite; Yeah, I have been considering this for a while. And perhaps build something by leveraging QueryDSL (http://www.querydsl.com/), or at least borrow internals for it. But I concluded that it was more work than fit into 3.0 plan. But I would be really happy to get to a situation where we have "ES backed indexer", which would help a lot going forward. The RDF implementation is also getting "old"... Cheers Niclas On Tue, Apr 4, 2017 at 3:15 PM, Stanislav Muhametsin < stanislav.muhametsin@zest.mail.kapsi.fi> wrote: > Hi! > > Hmm yeah, it's been quite a while since I wrote that beast. :D I would do > a lot of things differently now, but I guess we are stuck with what we have > (until someone rewrites that). > > There was a discussion in October 2016, and I am not sure if the issue > discussed then has been resolved, or maybe is (partially) the cause for > errors. > I will copy-paste my reply I wrote in October at the end of this mail. > > Looking at that issue link ( https://issues.apache.org/jira > /browse/POLYGENE-222 ), there might be something in detection of entity > composite types - looks like "the first bad commit" was something about > entity composite types no longer needing to extend EntityComposite > interface? > Indexing-SQL scans whole application structure on startup to detect all > the visible and indexable entity composite types, and if the things changed > there, it might cause problems. > > The other commits are more unfamiliar territory for me - looking at > attached test report, I think the most important information is the > standard output. > There is a bunch of "unsupported property type" messages - are > associations and manyassociations in Polygene just Property<..> these days? > That definetly will break things in Indexing-SQL. > It is a bit hard to follow for me since so many things have changed in > Polygene now (which is also a good thing - a sign of development!). > > Here is the copy-paste from October. > It seems that the problem was Indexing-SQL not recognizing "Identity" type > as primitive (something like 'String' or 'Integer'). > > -------- BEGIN QUOTED MAIL -------- > In "extensions/indexing-sql/src/main/java/org/apache/zest/index > /sql/support/skeletons/AbstractSQLStartup.java" file, there is > "initTypes" method. > You might want to add mapping for Identity.class in this._primitiveTypes > and jdbcTypes, and also most likely this._customizableTypes. > > I say "might" want to, since I have really really vague memories on how > that worked, and I realized I don't have any PC right now with Java coding > environment set up. > The "appendColumnDefinitionsForProperty" method in the same file uses the > type mappings mentioned above to deduce what kind of column is to be > created for property, which might be the issue here. > > Also, you probably want to modify the "/extensions/indexing-sql/src/ > main/java/org/apache/zest/index/sql/support/common/QNameInfo.java" file, > so that the detection whether some Java type is primitive is updated to > include Identity. > It is done just before setting this._isFinalTypePrimitive. > > Let us know if this is of any help to you. > -------- END QUOTED MAIL -------- > > > On 03/04/2017 19:53, Paul Merlin wrote: > >> Stan, Niclas, >> >> Indexing SQL has been broken for quite some time. >> See https://issues.apache.org/jira/browse/POLYGENE-222 >> >> That issue contains the result of bisecting the history to identify when >> it broke. With the Docker based testing infra it is now very easy to >> reproduce. >> >> Stan, you wrote that beast :) >> Niclas, one commit of yours broke that beast :) >> >> Could you have a look? >> >> Thanks! >> >> /Paul >> >> >> > -- Niclas Hedhman, Software Developer http://polygene.apache.org - New Energy for Java --94eb2c1a1ee8707378054c52b8b1--