From oak-issues-return-66517-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Thu Nov 22 08:45:06 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 B4DAA18067B for ; Thu, 22 Nov 2018 08:45:05 +0100 (CET) Received: (qmail 10913 invoked by uid 500); 22 Nov 2018 07:45:04 -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 10762 invoked by uid 99); 22 Nov 2018 07:45:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2018 07:45:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id F1DC3180D02 for ; Thu, 22 Nov 2018 07:45:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ATFDtQusBs1Z for ; Thu, 22 Nov 2018 07:45:02 +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 45E215FDA3 for ; Thu, 22 Nov 2018 07:45:02 +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 93CD8E2613 for ; Thu, 22 Nov 2018 07:45:01 +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 4E14021E7F for ; Thu, 22 Nov 2018 07:45:00 +0000 (UTC) Date: Thu, 22 Nov 2018 07:45:00 +0000 (UTC) From: "Thomas Mueller (JIRA)" To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OAK-7910) Composite node store: Creating a new Lucene index; reindex 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-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695626#comment-16695626 ] Thomas Mueller commented on OAK-7910: ------------------------------------- I think the changes in the TypeEditor and NameValidator (those are the problematic ones: they would break things) are only necessary if one would create an index _first_ in the read-only repository and _then_ in the read-write repository. They don't seem to be needed if the index is first created in the read-write repository, and _then_ in the read-only repository. For the *reindex* use case, the following changes are needed: * the change in IndexUpdate, so that reindexing works without removing :oak:mount-libs-index-data * the change in OakDirectory, as the old files can't be removed * the change in the CompositeNodeStore: not sure, I don't think so For the *new index* use case (index is first created in the read-write repository), the following changes are needed: * the change in the CompositeNodeStore For the *new index in strange order* use case (index is first created in the read-only repository), the following changes are needed: * the change in the CompositeNodeStore * the changes in the TypeEditor and NameValidator (which are very problematic) For the *remove index* use case, the following changes are needed: * the change in OakDirectory, as the old files can't be removed So I think we just don't support "new index in strange order". If one by mistake does that, then he will have to remove the index in the read-only repository again, then create it in the read-write repository, and only then in the read-only repository. I will now work on a better patch, with getMountByPath as suggested by [~tomek.rekawek]. > Composite node store: Creating a new Lucene index; reindex > ---------------------------------------------------------- > > Key: OAK-7910 > URL: https://issues.apache.org/jira/browse/OAK-7910 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: composite, core > Reporter: Thomas Mueller > Assignee: Thomas Mueller > Priority: Major > > With the composite node store, creating a Lucene index in the read-write repository fails due to the exception below. I think Oak shouldn't try to do node type validation for hidden nodes. > {noformat} > Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001: /oak:index/test/:oak:mount-libs-index-data[[]]: The primary type null does not exist > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor$1.onConstraintViolation(TypeEditor.java:109) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.constraintViolation(TypeEditor.java:234) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.createEffectiveType(TypeEditor.java:337) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.(TypeEditor.java:203) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.checkNodeTypeConstraints(TypeEditor.java:482) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.enter(TypeEditor.java:276) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:53) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889] > at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.enter(CompositeEditor.java:65) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889] > at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:121) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889] > at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeAdded(CompositeNodeState.java:304) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889] > at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeAdded(CompositeNodeState.java:247) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889] > Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001: /oak:index/test/:oak:mount-libs-index-data[[]]: The primary type null does not exist > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor$1.onConstraintViolation(TypeEditor.java:109) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.constraintViolation(TypeEditor.java:234) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.createEffectiveType(TypeEditor.java:337) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.(TypeEditor.java:203) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.checkNodeTypeConstraints(TypeEditor.java:482) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.enter(TypeEditor.java:276) [org.apache.jackrabbit.oak-core:1.9.10.R1845889] > at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:53) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889] > at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.enter(CompositeEditor.java:65) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889] > at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:121) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889] > at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeAdded(CompositeNodeState.java:304) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889] > at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeAdded(CompositeNodeState.java:247) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889] > at org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeAdded(MapRecord.java:443) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889] > at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:505) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889] > at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:440) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889] > at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:651) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889] > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)