jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1464384 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
Date Thu, 04 Apr 2013 09:20:20 GMT
Author: alexparvulescu
Date: Thu Apr  4 09:20:19 2013
New Revision: 1464384

URL: http://svn.apache.org/r1464384
Log:
OAK-747 Prevent WorkspaceInitializer(s) to index content

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java?rev=1464384&r1=1464383&r2=1464384&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java Thu Apr
 4 09:20:19 2013
@@ -230,8 +230,6 @@ public class Oak {
         OakInitializer.initialize(store, new CompositeInitializer(initializers), indexHooks);
 
         withEditorHook();
-        commitHooks.add(IndexHookManager.of(indexHooks));
-        CommitHook commitHook = CompositeHook.compose(commitHooks);
         QueryIndexProvider indexProvider = CompositeQueryIndexProvider.compose(queryIndexProviders);
 
         // FIXME: move to proper workspace initialization
@@ -244,8 +242,13 @@ public class Oak {
                                 return sc.getWorkspaceInitializer();
                             }
                         });
-        OakInitializer.initialize(workspaceInitializers, store, defaultWorkspaceName, indexHooks,
indexProvider, commitHook);
+        OakInitializer.initialize(workspaceInitializers, store,
+                defaultWorkspaceName, indexHooks, indexProvider,
+                CompositeHook.compose(commitHooks));
 
+        // add index hooks later to prevent the OakInitializer to do excessive indexing
+        commitHooks.add(IndexHookManager.of(indexHooks));
+        CommitHook commitHook = CompositeHook.compose(commitHooks);
         return new ContentRepositoryImpl(
                 store,
                 commitHook,



Mime
View raw message