Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-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 491B8DEC7 for ; Fri, 31 Aug 2012 07:31:10 +0000 (UTC) Received: (qmail 93379 invoked by uid 500); 31 Aug 2012 07:31:10 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 93282 invoked by uid 500); 31 Aug 2012 07:31:09 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 93253 invoked by uid 99); 31 Aug 2012 07:31:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2012 07:31:07 +0000 Date: Fri, 31 Aug 2012 18:31:07 +1100 (NCT) From: "Chetan Mehrotra (JIRA)" To: oak-dev@jackrabbit.apache.org Message-ID: <588616292.21144.1346398267813.JavaMail.jiratomcat@arcas> In-Reply-To: <2146223278.24937.1331911539195.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (OAK-28) Query implementation 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/OAK-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445740#comment-13445740 ] Chetan Mehrotra commented on OAK-28: ------------------------------------ Another change required in Indexer. The flushBuffer method is currently hiding the exception thrown {code} } catch (MicroKernelException e) { if (!mk.nodeExists(indexRootNode, revision)) { // the index node itself was removed, which is // unexpected but possible // this will cause all indexes to be removed, so // it can be ignored here + }else{ + throw e; } } {code} With a bit older codebase with IndexWrapper in use I saw some exceptions on restart like {noformat} org.apache.jackrabbit.mk.api.MicroKernelException: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_2 ON PUBLIC.REVS(ID)"; SQL statement: insert into REVS (ID, DATA, TIME) select ?, ?, ? [23505-158] at org.apache.jackrabbit.mk.core.MicroKernelImpl.commit(MicroKernelImpl.java:502) at org.apache.jackrabbit.oak.plugins.index.Indexer.commitChanges(Indexer.java:344) at org.apache.jackrabbit.oak.plugins.index.Indexer.flushBuffer(Indexer.java:412) at org.apache.jackrabbit.oak.plugins.index.Indexer.updateEnd(Indexer.java:406) at org.apache.jackrabbit.mk.index.IndexWrapper.commitStream(IndexWrapper.java:122) at org.apache.jackrabbit.mk.wrapper.MicroKernelWrapperBase.commit(MicroKernelWrapperBase.java:33) at org.apache.jackrabbit.oak.core.ContentRepositoryImpl.(ContentRepositoryImpl.java:122) {noformat} Would try with updated codebase and open an issue if problem persists > Query implementation > -------------------- > > Key: OAK-28 > URL: https://issues.apache.org/jira/browse/OAK-28 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, jcr > Reporter: Thomas Mueller > Assignee: Thomas Mueller > Labels: query > Attachments: OakToJcrQueryTreeConverter.java > > > A query engine needs to be implemented. > A query parser in oak-core should be able to handle xpath, sql2 and optionally other query languages. The jcr component must generate a valid query in one of those languages from JQOM queries and pass that statement along with value bindings, limit, offset, and name space mappings to the oak-core. > We need to: > * Define the oak-core API for handling queries. How are do we handle name space mappings, limit and offset > * Implement a query builder in the jcr component which takes care of translating JQOM queries to statements in string form > * Implement a query parser in oak-core and decide on a versatile AST representation which works with all query languages and which is extensible to future query languages. > * Implement the actual query execution engine which interprets the query AST -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira