svn commit: r1841947 - /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/LuceneIndexerProvider.java
Author: tommaso Date: Tue Sep 25 15:55:52 2018 New Revision: 1841947 URL: http://svn.apache.org/viewvc?rev=1841947=rev Log: OAK-7411 - fixed mongo IT failure Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/LuceneIndexerProvider.java Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/LuceneIndexerProvider.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/LuceneIndexerProvider.java?rev=1841947=1841946=1841947=diff == --- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/LuceneIndexerProvider.java (original) +++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/LuceneIndexerProvider.java Tue Sep 25 15:55:52 2018 @@ -25,6 +25,7 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.apache.jackrabbit.oak.index.IndexHelper; import org.apache.jackrabbit.oak.index.IndexerSupport; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition; import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexWriterFactory; import org.apache.jackrabbit.oak.plugins.index.lucene.directory.DirectoryFactory; import org.apache.jackrabbit.oak.plugins.index.lucene.directory.FSDirectoryFactory; @@ -63,7 +64,7 @@ public class LuceneIndexerProvider imple return null; } -IndexDefinition idxDefinition = IndexDefinition.newBuilder(root, definition.getNodeState(), indexPath).reindex().build(); +LuceneIndexDefinition idxDefinition = LuceneIndexDefinition.newBuilder(root, definition.getNodeState(), indexPath).reindex().build(); LuceneIndexWriter indexWriter = indexWriterFactory.newInstance(idxDefinition, definition, true); FulltextBinaryTextExtractor textExtractor = new FulltextBinaryTextExtractor(textCache, idxDefinition, true);
svn commit: r1841930 - /jackrabbit/oak/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java
Author: reschke Date: Tue Sep 25 13:01:01 2018 New Revision: 1841930 URL: http://svn.apache.org/viewvc?rev=1841930=rev Log: OAK-7753: Enable collection of stats for DataStore checkConsistency operation - fix Javadoc Modified: jackrabbit/oak/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java Modified: jackrabbit/oak/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java?rev=1841930=1841929=1841930=diff == --- jackrabbit/oak/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java (original) +++ jackrabbit/oak/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java Tue Sep 25 13:01:01 2018 @@ -71,7 +71,6 @@ public interface BlobGarbageCollector { * Returns consistency operation statistics * * @return stats object - * @throws Exception */ OperationsStatsMBean getConsistencyOperationStats(); }
svn commit: r1841926 [14/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-be
Modified: jackrabbit/oak/trunk/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/FulltextIndexPlanner.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/FulltextIndexPlanner.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/FulltextIndexPlanner.java (original) +++ jackrabbit/oak/trunk/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/FulltextIndexPlanner.java Tue Sep 25 12:24:15 2018 @@ -716,6 +716,7 @@ public class FulltextIndexPlanner { .setPathPrefix(getPathPrefix()) .setSupportsPathRestriction(definition.evaluatePathRestrictions()) .setDelayed(true) //Lucene is always async +.setDeprecated(definition.isDeprecated()) .setAttribute(FulltextIndex.ATTR_PLAN_RESULT, result) .setEstimatedEntryCount(estimatedEntryCount()) .setPlanName(indexPath);
svn commit: r1841926 [7/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexPlannerTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexPlannerTest.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexPlannerTest.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexPlannerTest.java Tue Sep 25 12:24:15 2018 @@ -26,17 +26,16 @@ import static org.apache.jackrabbit.oak. import static org.apache.jackrabbit.oak.api.Type.STRINGS; import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.DECLARING_NODE_TYPES; import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME; -import static org.apache.jackrabbit.oak.plugins.index.lucene.IndexStatistics.SYNTHETICALLY_FALLIABLE_FIELD; -import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.EVALUATE_PATH_RESTRICTION; -import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.INDEX_DATA_CHILD_NAME; -import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.INDEX_RULES; -import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.ORDERED_PROP_NAMES; -import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.PROP_FUNCTION; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.EVALUATE_PATH_RESTRICTION; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INDEX_DATA_CHILD_NAME; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INDEX_RULES; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.ORDERED_PROP_NAMES; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.PROP_FUNCTION; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.VERSION; +import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexStatistics.SYNTHETICALLY_FALLIABLE_FIELD; import static org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil.NT_TEST; import static org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil.child; import static org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil.registerTestNodeType; -import static org.apache.jackrabbit.oak.plugins.index.lucene.util.FunctionIndexProcessor.*; import static org.apache.jackrabbit.oak.plugins.index.lucene.util.LuceneIndexHelper.newLuceneIndexDefinition; import static org.apache.jackrabbit.oak.plugins.index.lucene.util.LuceneIndexHelper.newLucenePropertyIndexDefinition; import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE; @@ -61,11 +60,16 @@ import org.apache.jackrabbit.oak.api.Tre import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.commons.PathUtils; import org.apache.jackrabbit.oak.plugins.index.IndexConstants; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexPlanner.PropertyIndexResult; import org.apache.jackrabbit.oak.plugins.index.lucene.reader.DefaultIndexReader; import org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReader; import org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory; import org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder; +import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndex; +import org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndexPlanner; +import org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndexPlanner.PropertyIndexResult; +import org.apache.jackrabbit.oak.plugins.index.search.util.FunctionIndexProcessor; import org.apache.jackrabbit.oak.plugins.memory.PropertyValues; import org.apache.jackrabbit.oak.query.NodeStateNodeTypeInfoProvider; import org.apache.jackrabbit.oak.query.QueryEngineSettings; @@ -103,16 +107,16 @@ public class IndexPlannerTest { @After public void cleanup(){ -IndexPlanner.setUseActualEntryCount(true); +FulltextIndexPlanner.setUseActualEntryCount(true); } @Test public void planForSortField() throws Exception{ NodeBuilder defn = newLucenePropertyIndexDefinition(builder, "test", of("foo"), "async"); defn.setProperty(createProperty(ORDERED_PROP_NAMES, of("foo"), STRINGS)); -IndexNode node = createIndexNode(new IndexDefinition(root, defn.getNodeState(), "/foo")); -IndexPlanner planner = new IndexPlanner(node, "/foo",
svn commit: r1841926 [4/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java Tue Sep 25 12:24:15 2018 @@ -18,6 +18,7 @@ */ package org.apache.jackrabbit.oak.plugins.index.lucene; +import javax.jcr.PropertyType; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -29,31 +30,26 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; - -import javax.jcr.PropertyType; +import java.util.function.Predicate; import com.google.common.base.Joiner; import com.google.common.collect.AbstractIterator; import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Iterators; -import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; import com.google.common.collect.Sets; -import com.google.common.primitives.Chars; import org.apache.jackrabbit.oak.api.PropertyValue; -import org.apache.jackrabbit.oak.api.Result.SizePrecision; import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.commons.PathUtils; import org.apache.jackrabbit.oak.commons.PerfLogger; -import org.apache.jackrabbit.oak.commons.json.JsopBuilder; -import org.apache.jackrabbit.oak.commons.json.JsopWriter; -import org.apache.jackrabbit.oak.plugins.index.Cursors; -import org.apache.jackrabbit.oak.plugins.index.Cursors.PathCursor; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition.IndexingRule; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexPlanner.PlanResult; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexPlanner.PropertyIndexResult; +import org.apache.jackrabbit.oak.plugins.index.lucene.util.fv.SimSearchUtils; +import org.apache.jackrabbit.oak.plugins.index.search.FieldNames; +import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition.IndexingRule; import org.apache.jackrabbit.oak.plugins.index.lucene.property.HybridPropertyIndexLookup; import org.apache.jackrabbit.oak.plugins.index.lucene.score.ScorerProviderFactory; import org.apache.jackrabbit.oak.plugins.index.lucene.spi.FulltextQueryTermsProvider; @@ -62,22 +58,23 @@ import org.apache.jackrabbit.oak.plugins import org.apache.jackrabbit.oak.plugins.index.lucene.util.PathStoredFieldVisitor; import org.apache.jackrabbit.oak.plugins.index.lucene.util.SpellcheckHelper; import org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper; -import org.apache.jackrabbit.oak.plugins.index.lucene.util.fv.SimSearchUtils; -import org.apache.jackrabbit.oak.plugins.memory.PropertyValues; -import org.apache.jackrabbit.oak.spi.query.Cursor; -import org.apache.jackrabbit.oak.spi.query.Filter; -import org.apache.jackrabbit.oak.spi.query.Filter.PropertyRestriction; -import org.apache.jackrabbit.oak.spi.query.IndexRow; -import org.apache.jackrabbit.oak.spi.query.QueryConstants; -import org.apache.jackrabbit.oak.spi.query.QueryIndex; -import org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvanceFulltextQueryIndex; -import org.apache.jackrabbit.oak.spi.query.QueryLimits; +import org.apache.jackrabbit.oak.plugins.index.search.IndexNode; +import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.SizeEstimator; +import org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndex; +import org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndexPlanner.PlanResult; +import org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndexPlanner.PropertyIndexResult; import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextAnd; import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextContains; import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression; import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextOr; import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextTerm; import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextVisitor; +import org.apache.jackrabbit.oak.spi.query.Cursor; +import org.apache.jackrabbit.oak.spi.query.Filter; +import
svn commit: r1841926 [10/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-be
Added: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor2Test.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor2Test.java?rev=1841926=auto == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor2Test.java (added) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor2Test.java Tue Sep 25 12:24:15 2018 @@ -0,0 +1,353 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.jackrabbit.oak.plugins.index.lucene; + +import java.io.IOException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.jackrabbit.oak.api.CommitFailedException; +import org.apache.jackrabbit.oak.api.PropertyState; +import org.apache.jackrabbit.oak.commons.PathUtils; +import org.apache.jackrabbit.oak.plugins.index.IndexCommitCallback; +import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider; +import org.apache.jackrabbit.oak.plugins.index.IndexUpdateCallback; +import org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider; +import org.apache.jackrabbit.oak.plugins.index.IndexingContext; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorContext; +import org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil; +import org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder; +import org.apache.jackrabbit.oak.plugins.index.lucene.writer.LuceneIndexWriter; +import org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.PropertyUpdateCallback; +import org.apache.jackrabbit.oak.plugins.index.search.spi.editor.FulltextIndexWriterFactory; +import org.apache.jackrabbit.oak.spi.commit.CommitInfo; +import org.apache.jackrabbit.oak.spi.commit.Editor; +import org.apache.jackrabbit.oak.spi.commit.EditorHook; +import org.apache.jackrabbit.oak.spi.state.NodeBuilder; +import org.apache.jackrabbit.oak.spi.state.NodeState; +import org.apache.lucene.index.IndexableField; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.junit.Test; + +import static org.apache.jackrabbit.oak.InitialContentHelper.INITIAL_CONTENT; +import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.TYPE_LUCENE; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; +import static org.mockito.Mockito.mock; + +public class LuceneIndexEditor2Test { + +private NodeState root = INITIAL_CONTENT; +private NodeState before = root; +private IndexUpdateCallback updateCallback = mock(IndexUpdateCallback.class); +private ExtractedTextCache extractedTextCache = new ExtractedTextCache(0, 0); +private TestIndexingContext indexingContext = new TestIndexingContext(); +private TestWriterFactory writerFactory = new TestWriterFactory(); +private TestPropertyUpdateCallback propCallback = new TestPropertyUpdateCallback(); +private TestWriter writer = new TestWriter(); +private String indexPath = "/oak:index/fooIndex"; + +@Test +public void basics() throws Exception{ +IndexDefinitionBuilder defnb = new IndexDefinitionBuilder(); +defnb.indexRule("nt:base").property("foo").propertyIndex(); + +NodeState defnState = defnb.build(); +IndexDefinition defn = new IndexDefinition(root, defnState, indexPath); +LuceneIndexEditorContext ctx = newContext(defnState.builder(), defn, true); +
svn commit: r1841926 [6/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriter.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriter.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriter.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriter.java Tue Sep 25 12:24:15 2018 @@ -27,9 +27,10 @@ import com.google.common.io.Closer; import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.commons.PerfLogger; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition; import org.apache.jackrabbit.oak.plugins.index.lucene.directory.DirectoryFactory; import org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.util.ISO8601; import org.apache.lucene.analysis.Analyzer; @@ -53,7 +54,7 @@ class DefaultIndexWriter implements Luce private static final PerfLogger PERF_LOGGER = new PerfLogger(LoggerFactory.getLogger(LuceneIndexWriter.class.getName() + ".perf")); -private final IndexDefinition definition; +private final LuceneIndexDefinition definition; private final NodeBuilder definitionBuilder; private final DirectoryFactory directoryFactory; private final String dirName; @@ -65,7 +66,7 @@ class DefaultIndexWriter implements Luce private long genAtStart = -1; private boolean indexUpdated = false; -public DefaultIndexWriter(IndexDefinition definition, NodeBuilder definitionBuilder, +public DefaultIndexWriter(LuceneIndexDefinition definition, NodeBuilder definitionBuilder, DirectoryFactory directoryFactory, String dirName, String suggestDirName, boolean reindex, LuceneIndexWriterConfig writerConfig) { this.definition = definition; Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriterFactory.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriterFactory.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriterFactory.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriterFactory.java Tue Sep 25 12:24:15 2018 @@ -19,10 +19,13 @@ package org.apache.jackrabbit.oak.plugins.index.lucene.writer; - -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition; +import com.google.common.base.Preconditions; import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexWriterFactory; import org.apache.jackrabbit.oak.plugins.index.lucene.directory.DirectoryFactory; +import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; import org.apache.jackrabbit.oak.spi.mount.MountInfoProvider; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; @@ -41,14 +44,20 @@ public class DefaultIndexWriterFactory i } @Override -public LuceneIndexWriter newInstance(IndexDefinition definition, +public LuceneIndexWriter newInstance(IndexDefinition def, NodeBuilder definitionBuilder, boolean reindex) { +Preconditions.checkArgument(def instanceof LuceneIndexDefinition, +"Expected {} but found {} for index definition", +LuceneIndexDefinition.class, def.getClass()); + +LuceneIndexDefinition definition = (LuceneIndexDefinition)def; + if (mountInfoProvider.hasNonDefaultMounts()){ return new MultiplexingIndexWriter(directoryFactory, mountInfoProvider, definition, definitionBuilder, reindex, writerConfig); } return new DefaultIndexWriter(definition, definitionBuilder, directoryFactory, -LuceneIndexConstants.INDEX_DATA_CHILD_NAME, -
svn commit: r1841926 [2/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java Tue Sep 25 12:24:15 2018 @@ -35,28 +35,31 @@ import com.google.common.collect.Sets; import org.apache.jackrabbit.JcrConstants; import org.apache.jackrabbit.oak.api.PropertyValue; import org.apache.jackrabbit.oak.api.Result.SizePrecision; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition.IndexingRule; +import org.apache.jackrabbit.oak.plugins.index.Cursors; +import org.apache.jackrabbit.oak.plugins.index.Cursors.PathCursor; import org.apache.jackrabbit.oak.plugins.index.lucene.util.MoreLikeThisHelper; import org.apache.jackrabbit.oak.plugins.index.lucene.util.PathStoredFieldVisitor; import org.apache.jackrabbit.oak.plugins.index.lucene.util.SpellcheckHelper; import org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper; +import org.apache.jackrabbit.oak.plugins.index.search.FieldNames; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition.IndexingRule; +import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.SizeEstimator; import org.apache.jackrabbit.oak.plugins.memory.PropertyValues; -import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextAnd; -import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextContains; -import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression; -import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextOr; -import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextTerm; -import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextVisitor; import org.apache.jackrabbit.oak.spi.query.Cursor; -import org.apache.jackrabbit.oak.plugins.index.Cursors; -import org.apache.jackrabbit.oak.plugins.index.Cursors.PathCursor; import org.apache.jackrabbit.oak.spi.query.Filter; import org.apache.jackrabbit.oak.spi.query.Filter.PropertyRestriction; import org.apache.jackrabbit.oak.spi.query.IndexRow; import org.apache.jackrabbit.oak.spi.query.QueryConstants; -import org.apache.jackrabbit.oak.spi.query.QueryIndex; import org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvanceFulltextQueryIndex; import org.apache.jackrabbit.oak.spi.query.QueryLimits; +import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextAnd; +import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextContains; +import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression; +import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextOr; +import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextTerm; +import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextVisitor; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; @@ -69,7 +72,6 @@ import org.apache.lucene.index.MultiFiel import org.apache.lucene.index.Term; import org.apache.lucene.queryparser.classic.ParseException; import org.apache.lucene.queryparser.classic.QueryParser; -import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.IndexSearcher; @@ -99,15 +101,23 @@ import static com.google.common.base.Pre import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES; import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE; import static org.apache.jackrabbit.oak.api.Type.STRING; -import static org.apache.jackrabbit.oak.commons.PathUtils.*; +import static org.apache.jackrabbit.oak.commons.PathUtils.denotesRoot; +import static org.apache.jackrabbit.oak.commons.PathUtils.getAncestorPath; +import static org.apache.jackrabbit.oak.commons.PathUtils.getDepth; +import static org.apache.jackrabbit.oak.commons.PathUtils.getName; +import static org.apache.jackrabbit.oak.commons.PathUtils.getParentPath; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.VERSION; import static org.apache.jackrabbit.oak.plugins.index.lucene.TermFactory.newFulltextTerm; import static org.apache.jackrabbit.oak.plugins.index.lucene.TermFactory.newPathTerm; -import static org.apache.jackrabbit.oak.plugins.index.lucene.util.LuceneIndexHelper.skipTokenization; +import static org.apache.jackrabbit.oak.plugins.index.search.util.IndexHelper.skipTokenization; import static
svn commit: r1841926 [12/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-be
Added: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneWritesOnSegmentStatsTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneWritesOnSegmentStatsTest.java?rev=1841926=auto == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneWritesOnSegmentStatsTest.java (added) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneWritesOnSegmentStatsTest.java Tue Sep 25 12:24:15 2018 @@ -0,0 +1,388 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.jackrabbit.oak.plugins.index.lucene; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Random; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; + +import com.google.common.io.Files; +import org.apache.commons.io.FileUtils; +import org.apache.jackrabbit.core.data.FileDataStore; +import org.apache.jackrabbit.oak.InitialContent; +import org.apache.jackrabbit.oak.Oak; +import org.apache.jackrabbit.oak.api.ContentRepository; +import org.apache.jackrabbit.oak.api.Tree; +import org.apache.jackrabbit.oak.commons.IOUtils; +import org.apache.jackrabbit.oak.commons.concurrent.ExecutorCloser; +import org.apache.jackrabbit.oak.plugins.blob.BlobStoreStats; +import org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore; +import org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore; +import org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorProvider; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvider; +import org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil; +import org.apache.jackrabbit.oak.plugins.index.lucene.directory.CopyOnReadDirectory; +import org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder; +import org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider; +import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider; +import org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; +import org.apache.jackrabbit.oak.query.AbstractQueryTest; +import org.apache.jackrabbit.oak.segment.SegmentNodeStoreBuilders; +import org.apache.jackrabbit.oak.segment.file.FileStore; +import org.apache.jackrabbit.oak.segment.file.FileStoreBuilder; +import org.apache.jackrabbit.oak.segment.file.FileStoreStats; +import org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException; +import org.apache.jackrabbit.oak.spi.blob.BlobStore; +import org.apache.jackrabbit.oak.spi.blob.stats.BlobStatsCollector; +import org.apache.jackrabbit.oak.spi.commit.Observer; +import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider; +import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider; +import org.apache.jackrabbit.oak.spi.state.NodeStore; +import org.apache.jackrabbit.oak.stats.DefaultStatisticsProvider; +import org.apache.jackrabbit.oak.stats.StatisticsProvider; +import org.apache.lucene.store.Directory; +import org.apache.lucene.store.FSDirectory; +import org.apache.lucene.store.FilterDirectory; +import org.junit.After; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +/** + * Tests for checking impacts of Lucene writes wrt storage / configuration adjustments on the + * {@link org.apache.jackrabbit.oak.segment.SegmentNodeStore}. + */ +@Ignore("this
svn commit: r1841926 [3/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Added: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexNodeManager.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexNodeManager.java?rev=1841926=auto == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexNodeManager.java (added) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexNodeManager.java Tue Sep 25 12:24:15 2018 @@ -0,0 +1,376 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.oak.plugins.index.lucene; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.Semaphore; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import com.google.common.collect.Iterables; +import org.apache.jackrabbit.oak.commons.PathUtils; +import org.apache.jackrabbit.oak.commons.PerfLogger; +import org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.NRTIndex; +import org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.NRTIndexFactory; +import org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReader; +import org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory; +import org.apache.jackrabbit.oak.plugins.index.lucene.writer.LuceneIndexWriter; +import org.apache.jackrabbit.oak.plugins.index.search.update.ReaderRefreshPolicy; +import org.apache.jackrabbit.oak.spi.state.NodeState; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.MultiReader; +import org.apache.lucene.search.IndexSearcher; +import org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester; +import org.apache.lucene.store.Directory; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkState; +import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.ASYNC_PROPERTY_NAME; +import static org.apache.jackrabbit.oak.plugins.index.IndexUtils.getAsyncLaneName; + +/** + * Keeps track of the open read sessions for an index. + */ +public class LuceneIndexNodeManager { +// TODO oak-search: should extend LuceneIndexNodeManager +/** + * Name of the hidden node under which information about the checkpoints + * seen and indexed by each async indexer is kept. + */ +static final String ASYNC = ":async"; + +private static final AtomicInteger SEARCHER_ID_COUNTER = new AtomicInteger(); + +private static final PerfLogger PERF_LOGGER = +new PerfLogger(LoggerFactory.getLogger(LuceneIndexNodeManager.class.getName() + ".perf")); + +static LuceneIndexNodeManager open(String indexPath, NodeState root, NodeState defnNodeState, + LuceneIndexReaderFactory readerFactory, @Nullable NRTIndexFactory nrtFactory) +throws IOException { +LuceneIndexDefinition definition = new LuceneIndexDefinition(root, defnNodeState, indexPath); +List readers = readerFactory.createReaders(definition, defnNodeState, indexPath); +NRTIndex nrtIndex = nrtFactory != null ? nrtFactory.createIndex(definition) : null; +if (!readers.isEmpty() || (nrtIndex != null && !hasAsyncIndexerRun(root, indexPath, defnNodeState))){ +return new LuceneIndexNodeManager(PathUtils.getName(indexPath), definition, readers, nrtIndex); +} +return null; +} + +static boolean hasAsyncIndexerRun(NodeState root, String indexPath, NodeState defnNodeState) { +boolean hasAsyncNode = root.hasChildNode(ASYNC); + +String asyncLaneName = getAsyncLaneName(defnNodeState, indexPath, defnNodeState.getProperty(ASYNC_PROPERTY_NAME)); + +if (asyncLaneName !=
svn commit: r1841926 [11/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-be
Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java Tue Sep 25 12:24:15 2018 @@ -16,7 +16,16 @@ */ package org.apache.jackrabbit.oak.plugins.index.lucene; -import com.google.common.collect.ImmutableList; +import static com.google.common.collect.ImmutableList.of; +import static java.util.Arrays.asList; +import static junit.framework.Assert.assertEquals; +import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE; +import static org.apache.jackrabbit.JcrConstants.NT_UNSTRUCTURED; +import static org.apache.jackrabbit.oak.api.Type.STRING; +import static org.apache.jackrabbit.oak.api.Type.STRINGS; +import static org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil.useV2; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Iterator; @@ -27,6 +36,7 @@ import org.apache.jackrabbit.oak.api.Con import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.Tree; import org.apache.jackrabbit.oak.api.Type; +import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants; import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore; import org.apache.jackrabbit.oak.InitialContentHelper; import org.apache.jackrabbit.oak.query.AbstractQueryTest; @@ -37,16 +47,7 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; -import static com.google.common.collect.ImmutableList.of; -import static java.util.Arrays.asList; -import static junit.framework.Assert.assertEquals; -import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE; -import static org.apache.jackrabbit.JcrConstants.NT_UNSTRUCTURED; -import static org.apache.jackrabbit.oak.api.Type.STRING; -import static org.apache.jackrabbit.oak.api.Type.STRINGS; -import static org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil.useV2; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import com.google.common.collect.ImmutableList; /** * Tests the query engine using the default index implementation: the @@ -60,12 +61,12 @@ public class LuceneIndexQueryTest extend Tree indexDefn = createTestIndexNode(index, LuceneIndexConstants.TYPE_LUCENE); useV2(indexDefn); indexDefn.setProperty(LuceneIndexConstants.TEST_MODE, true); -indexDefn.setProperty(LuceneIndexConstants.EVALUATE_PATH_RESTRICTION, true); + indexDefn.setProperty(FulltextIndexConstants.EVALUATE_PATH_RESTRICTION, true); Tree props = TestUtil.newRulePropTree(indexDefn, "nt:base"); -props.getParent().setProperty(LuceneIndexConstants.INDEX_NODE_NAME, true); +props.getParent().setProperty(FulltextIndexConstants.INDEX_NODE_NAME, true); TestUtil.enablePropertyIndex(props, "c1/p", false); -TestUtil.enableForFullText(props, LuceneIndexConstants.REGEX_ALL_PROPS, true); +TestUtil.enableForFullText(props, FulltextIndexConstants.REGEX_ALL_PROPS, true); TestUtil.enablePropertyIndex(props, "a/name", false); TestUtil.enablePropertyIndex(props, "b/name", false); TestUtil.enableFunctionIndex(props, "length([name])"); @@ -112,8 +113,8 @@ public class LuceneIndexQueryTest extend root.commit(); Iterator result = executeQuery( -"select [jcr:path] from [nt:base] where isdescendantnode('/test')", -"JCR-SQL2").iterator(); +"select [jcr:path] from [nt:base] where isdescendantnode('/test')", +"JCR-SQL2").iterator(); assertTrue(result.hasNext()); assertEquals("/test/a", result.next()); assertEquals("/test/b", result.next()); @@ -128,8 +129,8 @@ public class LuceneIndexQueryTest extend root.commit(); Iterator result = executeQuery( -"select [jcr:path] from [nt:base] where isdescendantnode('/test') and name='World'", -"JCR-SQL2").iterator(); +"select [jcr:path] from [nt:base] where isdescendantnode('/test') and name='World'", +"JCR-SQL2").iterator(); assertTrue(result.hasNext()); assertEquals("/test/a", result.next()); assertFalse(result.hasNext()); @@ -150,8 +151,8 @@ public class LuceneIndexQueryTest extend root.commit(); Iterator result = executeQuery( -"select
svn commit: r1841926 [13/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-be
Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/OakDirectoryTestBase.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/OakDirectoryTestBase.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/OakDirectoryTestBase.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/OakDirectoryTestBase.java Tue Sep 25 12:24:15 2018 @@ -24,15 +24,14 @@ import static org.apache.commons.io.File import static org.apache.commons.io.FileUtils.ONE_MB; import static org.apache.jackrabbit.JcrConstants.JCR_DATA; import static org.apache.jackrabbit.oak.InitialContentHelper.INITIAL_CONTENT; -import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.INDEX_DATA_CHILD_NAME; import static org.apache.jackrabbit.oak.plugins.index.lucene.directory.OakDirectory.PROP_BLOB_SIZE; import static org.apache.jackrabbit.oak.plugins.index.lucene.directory.OakDirectory.PROP_UNIQUE_KEY; import static org.apache.jackrabbit.oak.plugins.index.lucene.directory.OakDirectory.PROP_UNSAFE_FOR_ACTIVE_DELETION; import static org.apache.jackrabbit.oak.plugins.index.lucene.directory.OakDirectory.UNIQUE_KEY_SIZE; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INDEX_DATA_CHILD_NAME; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; @@ -61,8 +60,10 @@ import org.apache.jackrabbit.oak.api.Pro import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.plugins.blob.BlobStoreBlob; import org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition; import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; import org.apache.jackrabbit.oak.plugins.memory.ArrayBasedBlob; import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState; import org.apache.jackrabbit.oak.plugins.memory.PropertyStates; @@ -106,7 +107,7 @@ abstract public class OakDirectoryTestBa @Test public void testCompatibility() throws Exception{ -builder.setProperty(LuceneIndexConstants.BLOB_SIZE, OakBufferedIndexFile.DEFAULT_BLOB_SIZE); +builder.setProperty(FulltextIndexConstants.BLOB_SIZE, OakBufferedIndexFile.DEFAULT_BLOB_SIZE); Directory dir = createDir(builder, false, "/foo"); byte[] data = assertWrites(dir, OakBufferedIndexFile.DEFAULT_BLOB_SIZE); @@ -370,7 +371,7 @@ abstract public class OakDirectoryTestBa .withBlobStore(getBlackHoleBlobStore()) .build(); SegmentNodeStore nodeStore = SegmentNodeStoreBuilders.builder(store).build(); -IndexDefinition defn = new IndexDefinition(INITIAL_CONTENT, EmptyNodeState.EMPTY_NODE, "/foo"); +LuceneIndexDefinition defn = new LuceneIndexDefinition(INITIAL_CONTENT, EmptyNodeState.EMPTY_NODE, "/foo"); Directory directory = getOakDirectoryBuilder(nodeStore.getRoot().builder(), defn).setReadOnly(false).build(); long expectedSize = ONE_GB * 2 + ONE_MB; @@ -431,7 +432,7 @@ abstract public class OakDirectoryTestBa int blobSize = minFileSize + 1000; builder = nodeStore.getRoot().builder(); -builder.setProperty(LuceneIndexConstants.BLOB_SIZE, blobSize); +builder.setProperty(FulltextIndexConstants.BLOB_SIZE, blobSize); Directory dir = createDir(builder, false, indexPath); blobStore.startFailing(); @@ -480,7 +481,7 @@ abstract public class OakDirectoryTestBa final AtomicBoolean identifiableBlob = new AtomicBoolean(false); -IndexDefinition def = new IndexDefinition(root, builder.getNodeState(), "/foo"); +LuceneIndexDefinition def = new LuceneIndexDefinition(root, builder.getNodeState(), "/foo"); BlobFactory factory = new BlobFactory() { @Override public Blob createBlob(InputStream in) throws IOException { @@ -535,7 +536,7 @@ abstract public class OakDirectoryTestBa // OAK-7066 @Test public void dontMarkInlinedBlobsFromDataStoreAsDeleted() throws Exception { -IndexDefinition def = new IndexDefinition(root,
svn commit: r1841926 [9/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Added: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexDefinitionTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexDefinitionTest.java?rev=1841926=auto == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexDefinitionTest.java (added) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexDefinitionTest.java Tue Sep 25 12:24:15 2018 @@ -0,0 +1,1277 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.jackrabbit.oak.plugins.index.lucene; + +import java.util.Collections; +import java.util.List; + +import javax.jcr.PropertyType; + +import com.google.common.collect.ImmutableList; +import org.apache.jackrabbit.JcrConstants; +import org.apache.jackrabbit.oak.api.Type; +import org.apache.jackrabbit.oak.plugins.index.IndexConstants; +import org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder; +import org.apache.jackrabbit.oak.plugins.index.lucene.util.TokenizerChain; +import org.apache.jackrabbit.oak.plugins.index.lucene.writer.CommitMitigatingTieredMergePolicy; +import org.apache.jackrabbit.oak.plugins.index.search.Aggregate; +import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition.IndexingRule; +import org.apache.jackrabbit.oak.plugins.index.search.IndexFormatVersion; +import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition; +import org.apache.jackrabbit.oak.spi.state.NodeBuilder; +import org.apache.jackrabbit.oak.spi.state.NodeState; +import org.apache.lucene.codecs.Codec; +import org.apache.lucene.index.LogByteSizeMergePolicy; +import org.apache.lucene.index.LogDocMergePolicy; +import org.apache.lucene.index.NoMergePolicy; +import org.apache.lucene.index.TieredMergePolicy; +import org.junit.Test; + +import static com.google.common.collect.ImmutableSet.of; +import static javax.jcr.PropertyType.TYPENAME_LONG; +import static javax.jcr.PropertyType.TYPENAME_STRING; +import static org.apache.jackrabbit.JcrConstants.NT_BASE; +import static org.apache.jackrabbit.oak.InitialContentHelper.INITIAL_CONTENT; +import static org.apache.jackrabbit.oak.api.Type.NAMES; +import static org.apache.jackrabbit.oak.api.Type.STRINGS; +import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME; +import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.ANALYZERS; +import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.ANL_DEFAULT; +import static org.apache.jackrabbit.oak.plugins.index.lucene.TestUtil.registerTestNodeType; +import static org.apache.jackrabbit.oak.plugins.index.lucene.util.LuceneIndexHelper.newLuceneIndexDefinition; +import static org.apache.jackrabbit.oak.plugins.index.lucene.util.LuceneIndexHelper.newLucenePropertyIndexDefinition; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.FULL_TEXT_ENABLED; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INCLUDE_PROPERTY_NAMES; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INCLUDE_PROPERTY_TYPES; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INDEX_DATA_CHILD_NAME; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.INDEX_RULES; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.PROP_NAME; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.PROP_NODE; +import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.TIKA; +import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE; +import static org.apache.jackrabbit.oak.plugins.memory.PropertyStates.createProperty;
svn commit: r1841926 [1/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Author: tommaso Date: Tue Sep 25 12:24:15 2018 New Revision: 1841926 URL: http://svn.apache.org/viewvc?rev=1841926=rev Log: OAK-7411 - make oak-lucene extend from oak-search Added: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LoggingInfoStream.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexDefinition.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorContext.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorProvider.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexInfoProvider.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexLookupUtil.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexNode.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexNodeManager.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProvider.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexStatistics.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexWriterFactory.java (with props) jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/IndexCopierClosedException.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMakerTest.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexDefinitionTest.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditor2Test.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorProviderTest.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexEditorTest.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderServiceTest.java (with props) jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneWritesOnSegmentStatsTest.java (with props) Removed: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/Aggregate.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/BadIndexTracker.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/ExtractedTextCache.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/FieldNames.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexCopierClosedException.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexDefinition.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexFormatVersion.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexNode.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexNodeManager.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexPlanner.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexStatistics.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexLookup.java jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/NodeStateCloner.java
svn commit: r1841926 [8/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexStatisticsTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexStatisticsTest.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexStatisticsTest.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexStatisticsTest.java Tue Sep 25 12:24:15 2018 @@ -17,6 +17,7 @@ package org.apache.jackrabbit.oak.plugins.index.lucene; import com.google.common.collect.Lists; +import org.apache.jackrabbit.oak.plugins.index.search.FieldNames; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.StringField; @@ -34,21 +35,21 @@ import java.io.IOException; import java.util.Collections; import java.util.List; -import static org.apache.jackrabbit.oak.plugins.index.lucene.IndexStatistics.SYNTHETICALLY_FALLIABLE_FIELD; +import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexStatistics.SYNTHETICALLY_FALLIABLE_FIELD; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.VERSION; import static org.junit.Assert.assertEquals; public class IndexStatisticsTest { @After public void resetFailFlags() { -IndexStatistics.failReadingFields = false; -IndexStatistics.failReadingSyntheticallyFalliableField = false; +LuceneIndexStatistics.failReadingFields = false; +LuceneIndexStatistics.failReadingSyntheticallyFalliableField = false; } @Test public void numDocs() throws Exception { Directory d = createSampleDirectory(2); -IndexStatistics stats = getStats(d); +LuceneIndexStatistics stats = getStats(d); assertEquals(2, stats.numDocs()); } @@ -62,14 +63,14 @@ public class IndexStatisticsTest { writer.close(); } -IndexStatistics stats = getStats(d); +LuceneIndexStatistics stats = getStats(d); assertEquals(1, stats.numDocs()); } @Test public void getSimpleFieldDocCnt() throws Exception { Directory d = createSampleDirectory(2); -IndexStatistics stats = getStats(d); +LuceneIndexStatistics stats = getStats(d); assertEquals(2, stats.getDocCountFor("foo")); } @@ -83,15 +84,15 @@ public class IndexStatisticsTest { writer.close(); } -IndexStatistics stats = getStats(d); +LuceneIndexStatistics stats = getStats(d); assertEquals("Stats don't need to get accurate result which might require reading more", -2, stats.getDocCountFor("foo")); +2, stats.getDocCountFor("foo")); } @Test public void absentFields() throws Exception { Directory d = createSampleDirectory(1); -IndexStatistics stats = getStats(d); +LuceneIndexStatistics stats = getStats(d); assertEquals(1, stats.getDocCountFor("foo")); assertEquals(0, stats.getDocCountFor("absent")); @@ -110,7 +111,7 @@ public class IndexStatisticsTest { document.add(new StringField(FieldNames.FULLTEXT_RELATIVE_NODE + "foo", "manualBar", Field.Store.NO)); document.add(new StringField("foo_facet", "manualBar", Field.Store.NO)); Directory d = createSampleDirectory(document); -IndexStatistics stats = getStats(d); +LuceneIndexStatistics stats = getStats(d); assertEquals(3, stats.getDocCountFor("foo")); assertEquals(0, stats.getDocCountFor("absent")); @@ -122,9 +123,9 @@ public class IndexStatisticsTest { @Test public void unableToIterateFields() throws Exception { -IndexStatistics.failReadingFields = true; +LuceneIndexStatistics.failReadingFields = true; -IndexStatistics stats = getStats(createSampleDirectory(100)); +LuceneIndexStatistics stats = getStats(createSampleDirectory(100)); assertEquals(100, stats.numDocs()); assertEquals(-1, stats.getDocCountFor("foo")); @@ -133,12 +134,12 @@ public class IndexStatisticsTest { @Test public void unableToReadCountForJcrTitle() throws Exception { -IndexStatistics.failReadingSyntheticallyFalliableField = true; +LuceneIndexStatistics.failReadingSyntheticallyFalliableField = true; Document doc = new Document(); doc.add(new StringField("foo1", "bar1", Field.Store.NO)); doc.add(new StringField(SYNTHETICALLY_FALLIABLE_FIELD, "title", Field.Store.NO)); -IndexStatistics stats = getStats(createSampleDirectory(doc)); +LuceneIndexStatistics stats = getStats(createSampleDirectory(doc));
svn commit: r1841926 [5/14] - in /jackrabbit/oak/trunk: oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/util/ oak-ben
Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueue.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueue.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueue.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/DocumentQueue.java Tue Sep 25 12:24:15 2018 @@ -37,11 +37,10 @@ import com.google.common.collect.ArrayLi import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import com.google.common.util.concurrent.Striped; - import org.apache.jackrabbit.oak.commons.PerfLogger; import org.apache.jackrabbit.oak.commons.concurrent.NotifyingFutureTask; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker; +import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexNode; import org.apache.jackrabbit.oak.plugins.index.lucene.writer.LuceneIndexWriter; import org.apache.jackrabbit.oak.stats.CounterStats; import org.apache.jackrabbit.oak.stats.MeterStats; @@ -243,9 +242,9 @@ public class DocumentQueue implements Cl return; } -IndexNode indexNode = tracker.acquireIndexNode(indexPath); +LuceneIndexNode indexNode = tracker.acquireIndexNode(indexPath); if (indexNode == null) { -log.debug("No IndexNode found for index [{}].", indexPath); +log.debug("No LuceneIndexNode found for index [{}].", indexPath); return; } @@ -254,7 +253,7 @@ public class DocumentQueue implements Cl boolean docAdded = false; for (LuceneDoc doc : docs) { if (writer == null) { -//IndexDefinition per IndexNode might have changed and local +//IndexDefinition per LuceneIndexNode might have changed and local //indexing is disabled. Ignore log.debug("No local IndexWriter found for index [{}]. Skipping index " + "entry for [{}]", indexPath, doc.docPath); Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserver.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserver.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserver.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserver.java Tue Sep 25 12:24:15 2018 @@ -22,9 +22,9 @@ package org.apache.jackrabbit.oak.plugin import java.util.Set; import com.google.common.collect.Sets; -import org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition; import org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker; import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker; +import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition; import org.apache.jackrabbit.oak.plugins.observation.Filter; import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java?rev=1841926=1841925=1841926=diff == --- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java (original) +++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java Tue Sep 25 12:24:15 2018 @@ -25,11 +25,10 @@ import org.apache.jackrabbit.oak.spi.com import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.jackrabbit.oak.stats.StatisticsProvider; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class LocalIndexObserver implements Observer{ +public class LocalIndexObserver implements Observer { private final Logger log = LoggerFactory.getLogger(getClass()); private final DocumentQueue docQueue;
svn commit: r1841915 - in /jackrabbit/oak/branches/1.8: ./ oak-api/ oak-auth-external/ oak-auth-ldap/ oak-authorization-cug/ oak-benchmarks/ oak-blob-cloud-azure/ oak-blob-cloud/ oak-blob-plugins/ oak
Author: davide Date: Tue Sep 25 10:05:23 2018 New Revision: 1841915 URL: http://svn.apache.org/viewvc?rev=1841915=rev Log: [maven-release-plugin] prepare for next development iteration Modified: jackrabbit/oak/branches/1.8/oak-api/pom.xml jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml jackrabbit/oak/branches/1.8/oak-blob-cloud-azure/pom.xml jackrabbit/oak/branches/1.8/oak-blob-cloud/pom.xml jackrabbit/oak/branches/1.8/oak-blob-plugins/pom.xml jackrabbit/oak/branches/1.8/oak-blob/pom.xml jackrabbit/oak/branches/1.8/oak-commons/pom.xml jackrabbit/oak/branches/1.8/oak-core-spi/pom.xml jackrabbit/oak/branches/1.8/oak-core/pom.xml jackrabbit/oak/branches/1.8/oak-examples/pom.xml jackrabbit/oak/branches/1.8/oak-examples/standalone/pom.xml jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml jackrabbit/oak/branches/1.8/oak-exercise/pom.xml jackrabbit/oak/branches/1.8/oak-http/pom.xml jackrabbit/oak/branches/1.8/oak-it-osgi/pom.xml jackrabbit/oak/branches/1.8/oak-it/pom.xml jackrabbit/oak/branches/1.8/oak-jcr/pom.xml jackrabbit/oak/branches/1.8/oak-lucene/pom.xml jackrabbit/oak/branches/1.8/oak-parent/pom.xml jackrabbit/oak/branches/1.8/oak-pojosr/pom.xml jackrabbit/oak/branches/1.8/oak-query-spi/pom.xml jackrabbit/oak/branches/1.8/oak-run-commons/pom.xml jackrabbit/oak/branches/1.8/oak-run/pom.xml jackrabbit/oak/branches/1.8/oak-search-mt/pom.xml jackrabbit/oak/branches/1.8/oak-security-spi/pom.xml jackrabbit/oak/branches/1.8/oak-segment-tar/pom.xml jackrabbit/oak/branches/1.8/oak-solr-core/pom.xml jackrabbit/oak/branches/1.8/oak-solr-osgi/pom.xml jackrabbit/oak/branches/1.8/oak-store-composite/pom.xml jackrabbit/oak/branches/1.8/oak-store-document/pom.xml jackrabbit/oak/branches/1.8/oak-store-spi/pom.xml jackrabbit/oak/branches/1.8/oak-upgrade/pom.xml jackrabbit/oak/branches/1.8/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-api/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-api/pom.xml?rev=1841915=1841914=1841915=diff == --- jackrabbit/oak/branches/1.8/oak-api/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-api/pom.xml Tue Sep 25 10:05:23 2018 @@ -19,7 +19,7 @@ org.apache.jackrabbit oak-parent -1.8.8 +1.8.9-SNAPSHOT ../oak-parent/pom.xml 4.0.0 Modified: jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml?rev=1841915=1841914=1841915=diff == --- jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml Tue Sep 25 10:05:23 2018 @@ -23,7 +23,7 @@ org.apache.jackrabbit oak-parent -1.8.8 +1.8.9-SNAPSHOT ../oak-parent/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml?rev=1841915=1841914=1841915=diff == --- jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml Tue Sep 25 10:05:23 2018 @@ -23,7 +23,7 @@ org.apache.jackrabbit oak-parent -1.8.8 +1.8.9-SNAPSHOT ../oak-parent/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml?rev=1841915=1841914=1841915=diff == --- jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml Tue Sep 25 10:05:23 2018 @@ -19,7 +19,7 @@ org.apache.jackrabbit oak-parent -1.8.8 +1.8.9-SNAPSHOT ../oak-parent/pom.xml 4.0.0 Modified: jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml?rev=1841915=1841914=1841915=diff == --- jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml Tue Sep 25 10:05:23 2018 @@ -23,7 +23,7 @@ org.apache.jackrabbit oak-parent -1.8.8 +1.8.9-SNAPSHOT ../oak-parent/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-blob-cloud-azure/pom.xml URL:
svn commit: r1841914 - /jackrabbit/oak/tags/jackrabbit-oak-1.8.8/
Author: davide Date: Tue Sep 25 10:05:09 2018 New Revision: 1841914 URL: http://svn.apache.org/viewvc?rev=1841914=rev Log: [maven-release-plugin] copy for tag jackrabbit-oak-1.8.8 Added: jackrabbit/oak/tags/jackrabbit-oak-1.8.8/ (props changed) - copied from r1841913, jackrabbit/oak/branches/1.8/ Propchange: jackrabbit/oak/tags/jackrabbit-oak-1.8.8/ -- --- svn:ignore (added) +++ svn:ignore Tue Sep 25 10:05:09 2018 @@ -0,0 +1,5 @@ +target +.* +*.iml +*.ipr +*.iws Propchange: jackrabbit/oak/tags/jackrabbit-oak-1.8.8/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Tue Sep 25 10:05:09 2018 @@ -0,0 +1,3 @@ +/jackrabbit/oak/branches/1.0:1665962 +/jackrabbit/oak/trunk:1820660-1820661,1820729,1820734,1820859,1820861,1820878,1820888,1820947,1821027,1821130,1821140-1821141,1821178,1821237,1821240,1821249,1821258,1821325,1821358,1821361-1821362,1821370,1821375,1821393,1821477,1821487,1821516,1821617,1821663,1821665,1821668,1821681,1821847,1821975-1821983,1822121,1822201,1822207,1822527,1822723,1822808,1822850,1822934,1823135,1823163,1823169,1823172,1823655,1823669,1824196,1824198,1824253,1824255,1824896,1824962,1825065,1825362,1825381,1825442,1825448,1825466,1825470-1825471,1825475,1825523,1825525,1825561,1825619-1825621,1825651,1825654,1825992,1826079,1826090,1826096,1826216,1826237,1826338,1826516,1826532,1826551,1826560,1826638,1826640,1826730,1826932,1826957,1827423,1827472,1827486,1827977,1828349,1828439,1828502,1828529,1828948,1829527,1829534,1829546,1829569,1829587,1829665,1829854,1829864,1829978,1829985,1829987,1829998,1830019,1830048,1830160,1830171,1830197,1830209,1830239,1830347,1830748,1830911,1830923,1831157-1831158 ,1831163,1831190,1831374,1831560,1831689,1832258,1832376,1832379,1832535,1833308,1833347,1833833,1834112,1834117,1834287,1834291,1834302,1834326,1834328,1834336,1834428,1834468,1834483,1834610,1834648-1834649,1834681,1834823,1834857-1834858,1835060,1835518,1835521,1835635,1835642,1835780,1835819,1836121,1836487,1836493,1837057,1837274,1837296,1837326,1837475,1837503,1837547,1837569,1837600,1837657,1837718,1837998,1838076,1838637,1839549,1839570,1839637,1839746,1840024,1840455,1840574 +/jackrabbit/trunk:1345480
svn commit: r1841913 - in /jackrabbit/oak/branches/1.8: ./ oak-api/ oak-auth-external/ oak-auth-ldap/ oak-authorization-cug/ oak-benchmarks/ oak-blob-cloud-azure/ oak-blob-cloud/ oak-blob-plugins/ oak
Author: davide Date: Tue Sep 25 10:04:53 2018 New Revision: 1841913 URL: http://svn.apache.org/viewvc?rev=1841913=rev Log: [maven-release-plugin] prepare release jackrabbit-oak-1.8.8 Modified: jackrabbit/oak/branches/1.8/oak-api/pom.xml jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml jackrabbit/oak/branches/1.8/oak-blob-cloud-azure/pom.xml jackrabbit/oak/branches/1.8/oak-blob-cloud/pom.xml jackrabbit/oak/branches/1.8/oak-blob-plugins/pom.xml jackrabbit/oak/branches/1.8/oak-blob/pom.xml jackrabbit/oak/branches/1.8/oak-commons/pom.xml jackrabbit/oak/branches/1.8/oak-core-spi/pom.xml jackrabbit/oak/branches/1.8/oak-core/pom.xml jackrabbit/oak/branches/1.8/oak-examples/pom.xml jackrabbit/oak/branches/1.8/oak-examples/standalone/pom.xml jackrabbit/oak/branches/1.8/oak-examples/webapp/pom.xml jackrabbit/oak/branches/1.8/oak-exercise/pom.xml jackrabbit/oak/branches/1.8/oak-http/pom.xml jackrabbit/oak/branches/1.8/oak-it-osgi/pom.xml jackrabbit/oak/branches/1.8/oak-it/pom.xml jackrabbit/oak/branches/1.8/oak-jcr/pom.xml jackrabbit/oak/branches/1.8/oak-lucene/pom.xml jackrabbit/oak/branches/1.8/oak-parent/pom.xml jackrabbit/oak/branches/1.8/oak-pojosr/pom.xml jackrabbit/oak/branches/1.8/oak-query-spi/pom.xml jackrabbit/oak/branches/1.8/oak-run-commons/pom.xml jackrabbit/oak/branches/1.8/oak-run/pom.xml jackrabbit/oak/branches/1.8/oak-search-mt/pom.xml jackrabbit/oak/branches/1.8/oak-security-spi/pom.xml jackrabbit/oak/branches/1.8/oak-segment-tar/pom.xml jackrabbit/oak/branches/1.8/oak-solr-core/pom.xml jackrabbit/oak/branches/1.8/oak-solr-osgi/pom.xml jackrabbit/oak/branches/1.8/oak-store-composite/pom.xml jackrabbit/oak/branches/1.8/oak-store-document/pom.xml jackrabbit/oak/branches/1.8/oak-store-spi/pom.xml jackrabbit/oak/branches/1.8/oak-upgrade/pom.xml jackrabbit/oak/branches/1.8/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-api/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-api/pom.xml?rev=1841913=1841912=1841913=diff == --- jackrabbit/oak/branches/1.8/oak-api/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-api/pom.xml Tue Sep 25 10:04:53 2018 @@ -19,7 +19,7 @@ org.apache.jackrabbit oak-parent -1.8.8-SNAPSHOT +1.8.8 ../oak-parent/pom.xml 4.0.0 Modified: jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml?rev=1841913=1841912=1841913=diff == --- jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-auth-external/pom.xml Tue Sep 25 10:04:53 2018 @@ -23,7 +23,7 @@ org.apache.jackrabbit oak-parent -1.8.8-SNAPSHOT +1.8.8 ../oak-parent/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml?rev=1841913=1841912=1841913=diff == --- jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-auth-ldap/pom.xml Tue Sep 25 10:04:53 2018 @@ -23,7 +23,7 @@ org.apache.jackrabbit oak-parent -1.8.8-SNAPSHOT +1.8.8 ../oak-parent/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml?rev=1841913=1841912=1841913=diff == --- jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-authorization-cug/pom.xml Tue Sep 25 10:04:53 2018 @@ -19,7 +19,7 @@ org.apache.jackrabbit oak-parent -1.8.8-SNAPSHOT +1.8.8 ../oak-parent/pom.xml 4.0.0 Modified: jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml?rev=1841913=1841912=1841913=diff == --- jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml (original) +++ jackrabbit/oak/branches/1.8/oak-benchmarks/pom.xml Tue Sep 25 10:04:53 2018 @@ -23,7 +23,7 @@ org.apache.jackrabbit oak-parent -1.8.8-SNAPSHOT +1.8.8 ../oak-parent/pom.xml Modified: jackrabbit/oak/branches/1.8/oak-blob-cloud-azure/pom.xml URL:
svn commit: r1841912 - /jackrabbit/oak/branches/1.8/RELEASE-NOTES.txt
Author: davide Date: Tue Sep 25 09:54:14 2018 New Revision: 1841912 URL: http://svn.apache.org/viewvc?rev=1841912=rev Log: Apache Jackrabbit Oak 1.8.8 release notes Modified: jackrabbit/oak/branches/1.8/RELEASE-NOTES.txt Modified: jackrabbit/oak/branches/1.8/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/RELEASE-NOTES.txt?rev=1841912=1841911=1841912=diff == --- jackrabbit/oak/branches/1.8/RELEASE-NOTES.txt (original) +++ jackrabbit/oak/branches/1.8/RELEASE-NOTES.txt Tue Sep 25 09:54:14 2018 @@ -1,4 +1,4 @@ -Release Notes -- Apache Jackrabbit Oak -- Version 1.8.7 +Release Notes -- Apache Jackrabbit Oak -- Version 1.8.8 Introduction @@ -7,52 +7,59 @@ Jackrabbit Oak is a scalable, high-perfo repository designed for use as the foundation of modern world-class web sites and other demanding content applications. -Jackrabbit Oak 1.8.7 is a patch release that contains fixes and +Jackrabbit Oak 1.8.8 is a patch release that contains fixes and improvements over Oak 1.8. Jackrabbit Oak 1.8.x releases are considered stable and targeted for production use. The Oak effort is a part of the Apache Jackrabbit project. Apache Jackrabbit is a project of the Apache Software Foundation. -Changes in Oak 1.8.7 +Changes in Oak 1.8.8 - Technical task -[OAK-7359] - Update to MongoDB Java driver 3.6 -[OAK-7625] - remove @Nonnegative annotation in NodeDocumentCache -[OAK-7632] - remove JSR 305 annotations in Groovy code +[OAK-7472] - tests should pass with locking disabled +[OAK-7587] - RDB*Store: update mysql driver reference to 8.0.11 +[OAK-7590] - RDB*Store: update Tomcat JDBC pool dependency to 8.5.32 +[OAK-7670] - RDB*Store: update postgresql JDBC driver reference to 42.2.4 +[OAK-7673] - RDB*Store: update mysql driver reference to 8.0.12 +[OAK-7690] - RDB*Store: update SQLServer JDBC dependency to 7.0.0.jre* +[OAK-7704] - RDB*Store: log message after failed DB upgrade too verbose Bug -[OAK-7389] - Mongo/FileBlobStore does not update timestamp for -already existing blobs -[OAK-7428] - LdapIdentityProvider doesn't support creating -external ids from the uid attribute -[OAK-7447] - Sporadic test failures when connection is closed -twice -[OAK-7540] - Unique property index update fails in composite -NodeStore setup -[OAK-7686] - Partial migration doesn't update Lucene indexing data -[OAK-7687] - :async node is being removed during the partial -migration -[OAK-7707] - DocumentNodeStoreServiceTest always connects to -localhost -[OAK-7713] - Test failure: - SecurityProviderRegistrationTest.testRequiredUserAuthenticationFactoryNotAvailable() +[OAK-7588] - Build failure: unapproved license +[OAK-7721] - Records of specific size bring SegmentBufferWriter#flush to fail + +New Feature + +[OAK-7575] - Make it possible to index and search over similar feature vectors Improvement -[OAK-7706] - Update to MongoDB Java driver 3.6.4 +[OAK-7367] - Unify mockito versions and update to latest +[OAK-7720] - Log hex dump of too big segments + +Test + +[OAK-6517] - ActiveDeletedBlobCollectionIT.simpleAsyncIndexUpdateBasedBlobCollection failing intermittently Task -[OAK-7435] - Run travis build on MongoDB 3.6 -[OAK-7512] - RestoreTest.testRestoreNameJcr2 occasionally failing -[OAK-7607] - Update 7.0.* Tomcat dependencies once 7.0.90 is -released -[OAK-7677] - Announcement mail template lacks line feeds in front -of release notes +[OAK-7578] - Update spotbugs plugin to 3.1.5 +[OAK-7579] - remove obsolete findbugs reference from reactor pom +[OAK-7581] - oak-examples: remove special case for failsafe plugin +[OAK-7583] - oak-examples/webapp: update jetty-maven-plugin dependency +[OAK-7585] - oak-examples/standalone: update spring boot version +[OAK-7622] - Update httpcomponent dependencies to 4.4.10/4.5.6 (and declare the versions globally) +[OAK-7624] - Add "org.apache.jackrabbit.oak.plugins.document.spi" to package export filter +[OAK-7641] - various internal APIs missing in package export filter +[OAK-7653] - upgrade to Jacoco version compatible with Java 11 +[OAK-7675] - oak-pojosr: replace mockito-all by mockito-core +[OAK-7678] - Update to default mockito version (defined in oak-parent) +[OAK-7679] - oak-core: update Mockito version and fix test case to be compatible with it +[OAK-7685] - Update easymock dependency to 3.6 In addition to the above-mentioned changes, this release contains all changes included up to the Apache Jackrabbit Oak 1.8.x release.
svn commit: r1841909 - in /jackrabbit/oak/trunk: oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/ oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/ oak
Author: stillalex Date: Tue Sep 25 08:13:45 2018 New Revision: 1841909 URL: http://svn.apache.org/viewvc?rev=1841909=rev Log: OAK-7778 PasswordUtil#isPlainTextPassword doesn't validate PBKDF2 scheme Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportTest.java jackrabbit/oak/trunk/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java jackrabbit/oak/trunk/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtilTest.java Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportTest.java?rev=1841909=1841908=1841909=diff == --- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportTest.java (original) +++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserImportTest.java Tue Sep 25 08:13:45 2018 @@ -35,6 +35,7 @@ import org.apache.jackrabbit.api.securit import org.apache.jackrabbit.api.security.user.Impersonation; import org.apache.jackrabbit.api.security.user.User; import org.apache.jackrabbit.oak.spi.security.user.UserConstants; +import org.apache.jackrabbit.oak.spi.security.user.util.PasswordUtil; import org.apache.jackrabbit.test.NotExecutableException; import org.junit.Test; @@ -226,7 +227,7 @@ public class UserImportTest extends Abst String pwValue = n.getProperty(UserConstants.REP_PASSWORD).getString(); assertFalse(plainPw.equals(pwValue)); -assertTrue(pwValue.toLowerCase().startsWith("{sha")); +assertTrue(pwValue.toLowerCase().startsWith("{" + PasswordUtil.DEFAULT_ALGORITHM.toLowerCase())); } /** Modified: jackrabbit/oak/trunk/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java?rev=1841909=1841908=1841909=diff == --- jackrabbit/oak/trunk/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java (original) +++ jackrabbit/oak/trunk/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil.java Tue Sep 25 08:13:45 2018 @@ -50,7 +50,7 @@ public final class PasswordUtil { /** * @since OAK 1.0 */ -private static final String PBKDF2_PREFIX = "PBKDF2"; +static final String PBKDF2_PREFIX = "PBKDF2"; public static final String DEFAULT_ALGORITHM = "SHA-256"; public static final int DEFAULT_SALT_SIZE = 8; @@ -159,7 +159,7 @@ public final class PasswordUtil { * the given {@code hashedPassword} string. */ public static boolean isSame(@Nullable String hashedPassword, @NotNull String password) { -if (hashedPassword == null) { +if (hashedPassword == null || password == null) { return false; } try { @@ -329,7 +329,11 @@ public final class PasswordUtil { if (hashedPwd.charAt(0) == '{' && end > 0 && end < hashedPwd.length()-1) { String algorithm = hashedPwd.substring(1, end); try { -MessageDigest.getInstance(algorithm); +if (algorithm.startsWith(PBKDF2_PREFIX)) { +SecretKeyFactory.getInstance(algorithm); +} else { +MessageDigest.getInstance(algorithm); +} return algorithm; } catch (NoSuchAlgorithmException e) { log.debug("Invalid algorithm detected " + algorithm, e); Modified: jackrabbit/oak/trunk/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtilTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtilTest.java?rev=1841909=1841908=1841909=diff == --- jackrabbit/oak/trunk/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtilTest.java (original) +++ jackrabbit/oak/trunk/oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtilTest.java Tue Sep 25 08:13:45 2018 @@ -33,6 +33,7 @@ import static org.junit.Assert.assertEqu import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.junit.Assume.assumeFalse;