jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Deparvu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7510) Run repository initializers with hooks
Date Thu, 23 Aug 2018 08:18:00 GMT

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

Alex Deparvu commented on OAK-7510:
-----------------------------------

due to issues related to namespaces referenced in repository initializers I decided to try
an alternative idea: have the NameValidator be less strict with the namespace checks if it
is dealing with the initial content scenario.

To clarify what this problem looks like: when defining lucene indexes via the repository initializer
(which is not a bad idea, as you'd like to have them defined as early as possible to avoid
extra traversals during the initial index buid), one can specify indexing rules what refer
to node types. these node types are then used as node names under the definition node which
will trigger the namespace validator checks. because the index definition is installed so
early (repo inits run first before anything else) it can happen that the referenced node types
are not yet installed (they will probably be installed later) making the validation fail.
In an ideal world no component should be able to reference non existing namespaces, but this
case is too complicated to untangle now, so I opted for the workaround mentioned above.

[~mreutegg] would love to have your thoughts on this & the diff in general if you have
some spare time!


> Run repository initializers with hooks
> --------------------------------------
>
>                 Key: OAK-7510
>                 URL: https://issues.apache.org/jira/browse/OAK-7510
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Alex Deparvu
>            Assignee: Alex Deparvu
>            Priority: Major
>              Labels: modularization
>             Fix For: 1.10
>
>
> Currently the repository initializers (RepositoryInitializer and WorkspaceInitializer)
run when the repo boots without any hooks [0] which means that current RepositoryInitializers
need to setup custom Roots (roots with hardcoded editor providers like NamespaceEditorProvider
and TypeEditorProvider) on top of the provided builders to be able to setup properly. I'm
looking at the InitialContent [1] and the CugConfiguration [2] in the context of installing
node types.
> I would like to look into removing the hardcoded providers and trying to run all existing
editors over the content produced by the initializers.
> As an added benefit this will allow decoupling of hard dependencies between components
(see for example OAK-7499)
> [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java#L687

> [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/InitialContent.java#L134
> [2] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-authorization-cug/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/CugConfiguration.java#L162



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message