From oak-issues-return-64550-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Fri Aug 31 16:52:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EBAE8180675 for ; Fri, 31 Aug 2018 16:52:03 +0200 (CEST) Received: (qmail 76293 invoked by uid 500); 31 Aug 2018 14:52:03 -0000 Mailing-List: contact oak-issues-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-issues@jackrabbit.apache.org Received: (qmail 76273 invoked by uid 99); 31 Aug 2018 14:52:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2018 14:52:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 92B091A1B91 for ; Fri, 31 Aug 2018 14:52:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.3 X-Spam-Level: X-Spam-Status: No, score=-110.3 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id eXCODXO8Z7lr for ; Fri, 31 Aug 2018 14:52:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 60D345F260 for ; Fri, 31 Aug 2018 14:52:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C05ECE0360 for ; Fri, 31 Aug 2018 14:52:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4138B26B57 for ; Fri, 31 Aug 2018 14:52:00 +0000 (UTC) Date: Fri, 31 Aug 2018 14:52:00 +0000 (UTC) From: "Alex Deparvu (JIRA)" To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OAK-7510) Run repository initializers with hooks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-7510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16598798#comment-16598798 ] Alex Deparvu commented on OAK-7510: ----------------------------------- trying to apply [~tmueller] idea, I ran into another bump. It seems there's yet another component that will bypass the initial hooks and inject some property [0], the ClusterRepositoryInfo, this one seems segment-tar specific. The timing is interesting as it comes as soon as the NodeStore is available in OSGi which can be before the init hooks run [1], and I can't tell if this is ok or not, it feels like it should come after. Nevertheless I think I found a way around this and will update the patch soon. [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/cluster/ClusterRepositoryInfo.java#L82 [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreRegistrar.java#L374 > 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)