jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parvulescu <alex.parvule...@gmail.com>
Subject Re: strange restart behavior
Date Wed, 16 Jan 2013 16:36:21 GMT
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(KernelNodeState.java:169)
> at
> org.apache.jackrabbit.oak.spi.state.AbstractNodeState.hasChildNode(AbstractNodeState.java:63)
> at
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.hasBaseState(MemoryNodeBuilder.java:173)
> at
> org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.child(MemoryNodeBuilder.java:465)
> at
> org.apache.jackrabbit.oak.plugins.index.p2.strategy.ContentMirrorStoreStrategy.insert(ContentMirrorStoreStrategy.java:123)
> at
> org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexUpdate.apply(Property2IndexUpdate.java:146)
> at
> org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexDiff.apply(Property2IndexDiff.java:232)
> at
> org.apache.jackrabbit.oak.plugins.index.IndexHookManager.apply(IndexHookManager.java:71)
> at
> org.apache.jackrabbit.oak.plugins.index.IndexHookManager.processCommit(IndexHookManager.java:61)
> at
> org.apache.jackrabbit.oak.spi.lifecycle.OakInitializer.initialize(OakInitializer.java: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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message