jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: strange restart behavior
Date Thu, 17 Jan 2013 08:12:27 GMT
OK, thanks for the pointer.

Regards
 Marcel

> -----Original Message-----
> From: Alex Parvulescu [mailto:alex.parvulescu@gmail.com]
> Sent: Mittwoch, 16. Januar 2013 17:36
> To: oak-dev@jackrabbit.apache.org
> Subject: Re: strange restart behavior
> 
> Hi Marcel,
> 
> You are right, there is a problem there!
> 
> It currently works like that because we needed to index the initial content
> (mostly security related content) otherwise some queries would fail.
> 
> Right now each RepositoryInitializer is free to add some content but that
> usually happens on a private branch which is merged into the NodeStore, so
> the IndexHookManager cannot distinguish between new content from the
> initializer and already existing content from before.
> 
> What we could do is related to the existing TODO in the code: refactor the
> code so that we can branch before running the RepositoryInitializer(s),
> initialize on the fresh branch, index it, and finally merge it back with
> everything included. (This way we can also save a bunch of branch/merge
> calls - not that it is really important.)
> 
> See OAK-410 for the initial discussion [0].
> 
> best,
> alex
> 
> [0] https://issues.apache.org/jira/browse/OAK-410
> 
> 
> On Wed, Jan 16, 2013 at 3:44 PM, Marcel Reutegger
> <mreutegg@adobe.com>wrote:
> 
> > Hi,
> >
> > I see a strange behavior on restart of the repository.
> >
> > the thread dump shows something like this:
> >
> > at
> >
> org.apache.jackrabbit.oak.kernel.KernelNodeState.getChildNode(KernelNod
> eState.java:169)
> > at
> >
> org.apache.jackrabbit.oak.spi.state.AbstractNodeState.hasChildNode(Abstra
> ctNodeState.java:63)
> > at
> >
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.hasBaseSta
> te(MemoryNodeBuilder.java:173)
> > at
> >
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.child(Mem
> oryNodeBuilder.java:465)
> > at
> >
> org.apache.jackrabbit.oak.plugins.index.p2.strategy.ContentMirrorStoreStra
> tegy.insert(ContentMirrorStoreStrategy.java:123)
> > at
> >
> org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexUpdate.apply(Pr
> operty2IndexUpdate.java:146)
> > at
> >
> org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexDiff.apply(Proper
> ty2IndexDiff.java:232)
> > at
> >
> org.apache.jackrabbit.oak.plugins.index.IndexHookManager.apply(IndexHo
> okManager.java:71)
> > at
> >
> org.apache.jackrabbit.oak.plugins.index.IndexHookManager.processCommit
> (IndexHookManager.java:61)
> > at
> >
> org.apache.jackrabbit.oak.spi.lifecycle.OakInitializer.initialize(OakInitializer.ja
> va:44)
> > at org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:225)
> >
> > I'm probably misunderstanding something here, but is
> > OakInitializer.initialize() really correct?
> >
> > It does:
> >
> >             branch.setRoot(IndexHookManager.of(indexHook).processCommit(
> >                     MemoryNodeState.EMPTY_NODE, root.getNodeState()));
> >
> > doesn't that indicate to the index hook manager that the complete
> > repository
> > content was added, because EMPTY_NODE is used for before state?
> >
> > regards
> >  marcel
> >

Mime
View raw message