[ https://issues.apache.org/jira/browse/OAK-8603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16934460#comment-16934460 ]
Vikas Saurabh commented on OAK-8603: ------------------------------------ [~fabrizio.fort...@gmail.com], here are few things I'd probably want to change: * maybe we should split the patch into refactoring and impl+test (I'm ok to refactor in context of this issue - I just feel that splitting it into 2 commits might be better) * maybe we can remove {{before}} and {{after}} from {{leaveNew}} method * I'm not completely sure if making {{TEMPORARY_FOLDER}} as a static class rule is a good idea - afaict, that would mean that different tests would use the same temp folder and hence can theoretically interfere with each other * I think {{reindexCounterTest}} should really reside in {{oak-core}}. * Kinda on the same lines, why do we need to setup lucene index for testing counter index? * {code:java} // retrieve counter again (maybe not needed) c = s.getRootNode().getNode(INDEX_DEFINITIONS_NAME).getNode("counter");{code} This is indeed not needed * In the spirit of refactoring, maybe we should have an {{@After}} method that can do {{repoV1.cleanup()}} Here's what I've got [^OAK-8603_3_fix.patch] [^OAK-8603_3_refactor.patch] (other than having the test in oak-core). Wdyt? > Composite Node Store + Counter Index: allow indexing from scratch / reindex > --------------------------------------------------------------------------- > > Key: OAK-8603 > URL: https://issues.apache.org/jira/browse/OAK-8603 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: composite, indexing > Reporter: Thomas Mueller > Assignee: Vikas Saurabh > Priority: Major > Labels: fabriziofortino > Attachments: OAK-8603.patch, OAK-8603_2.patch, OAK-8603_3_fix.patch, > OAK-8603_3_refactor.patch > > > When using the composite node store with a read-only portion of the > repository, the counter index does not allow to index from scratch / reindex. > Index from scratch is needed in case the async checkpoint is lost. Reindex is > started by setting the "reindex" flag to true. > Currently the failure is: > {noformat} > 05.09.2019 09:29:21.892 *WARN* [async-index-update-async] > org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate [async] The index > update is still failing > java.lang.UnsupportedOperationException: This builder is read-only. > at > org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder.unsupported(ReadOnlyBuilder.java:44) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder.child(ReadOnlyBuilder.java:189) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder.child(ReadOnlyBuilder.java:34) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.getBuilder(NodeCounterEditor.java:184) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.leaveNew(NodeCounterEditor.java:162) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditor.leave(NodeCounterEditor.java:114) > [org.apache.jackrabbit.oak-core:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(CompositeEditor.java:73) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:59) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:129) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160) > [org.apache.jackrabbit.oak-store-spi:1.16.0.R1866113] > at > org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:504) > [org.apache.jackrabbit.oak-segment-tar:1.16.0.R1866113] > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)