[ 
https://issues.apache.org/jira/browse/OAK-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501814#comment-13501814
 ] 

Alex Parvulescu edited comment on OAK-410 at 11/21/12 10:00 AM:
----------------------------------------------------------------

proposed patch.

I've added a new class {{OakInitializer}} that handles the #initialize call and 
then the reindex.

A further improvement is to merge all the #initialize calls on a single branch 
together with the index call. Unfortunately this is not possible now, not all 
the initializers can be easily refactored.
This improvement should be tracked separately and remains marked as a todo in 
the class.

Another problem is the osgi init of the initializers, marked as a todo in the 
{{OsgiRepositoryInitializer}} class.
I'd like to get a reference to the current {{OsgiRepositoryInitializer}} via 
the osgi mechanism and use OakInitializer to run the #initialize call.

I've also hidden {{IndexHookManager}}'s constructor to easily track down the 
references to it. Following the refactoring introduced by this patch, the class 
should rarely be used directly, everything should pass by the {{Oak#add}} 
methods.

[edit] added in the {{IndexHookManager}} bit.
                
      was (Author: alex.parvulescu):
    proposed patch.

I've added a new class {{OakInitializer}} that handles the #initialize call and 
then the reindex.

A further improvement is to merge all the #initialize calls on a single branch 
together with the index call. Unfortunately this is not possible now, not all 
the initializers can be easily refactored.
This improvement should be tracked separately and remains marked as a todo in 
the class.

Another problem is the osgi init of the initializers, marked as a todo in 
the{{OsgiRepositoryInitializer}} class.
I'd like to get a reference to the current {{OsgiRepositoryInitializer}} via 
the osgi mechanism and use OakInitializer to run the #initialize call.
                  
> RepositoryInitializer runs before the CommitHooks are in place
> --------------------------------------------------------------
>
>                 Key: OAK-410
>                 URL: https://issues.apache.org/jira/browse/OAK-410
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Alex Parvulescu
>             Fix For: 0.6
>
>         Attachments: 
> 0001-OAK-410-RepositoryInitializer-runs-before-the-Commit.patch, 
> OAK-410.patch, OAK-410-v3.patch
>
>
> The InitialContent installs a bunch of content nodes before the CommitHooks 
> are enabled.
> This hurts the query indexes as they don't get notified about the initial 
> content and cannot index/process it.
> I'm mostly referring to the Auth stuff that relies on a combo of initial 
> content & queries.
> Luckily when using the PropertyIndex it does fallback to full repository 
> traversal, which works (albeit slowly). Unfortunately I can't say the same 
> for the lucene index).
> A bit of context here [0].
> [0] 
> https://issues.apache.org/jira/browse/OAK-403?focusedCommentId=13486763&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13486763

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

Reply via email to