jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-28) Query implementation
Date Fri, 31 Aug 2012 07:31:07 GMT

    [ 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

 } 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;

With a bit older codebase with IndexWrapper in use I saw some exceptions on restart like 

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.<init>(ContentRepositoryImpl.java:122)

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

View raw message