You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by th...@apache.org on 2023/02/03 15:18:16 UTC

[jackrabbit-oak] 01/01: OAK-10102 Disable lazy index download by default

This is an automated email from the ASF dual-hosted git repository.

thomasm pushed a commit to branch OAK-10102
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 6a57f9da4a3e12f5203c3adb5274220f5ddf7a48
Author: Thomas Mueller <th...@apache.org>
AuthorDate: Fri Feb 3 16:18:01 2023 +0100

    OAK-10102 Disable lazy index download by default
---
 .../oak/plugins/index/lucene/LucenePropertyIndex.java        | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java b/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java
index 4f03cb22fd..b4a243f029 100644
--- a/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java
+++ b/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java
@@ -47,6 +47,7 @@ import org.apache.jackrabbit.oak.api.PropertyValue;
 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.properties.SystemPropertySupplier;
 import org.apache.jackrabbit.oak.plugins.index.lucene.util.fv.SimSearchUtils;
 import org.apache.jackrabbit.oak.plugins.index.lucene.writer.LuceneIndexWriter;
 import org.apache.jackrabbit.oak.plugins.index.search.FieldNames;
@@ -194,10 +195,14 @@ import static org.apache.lucene.search.BooleanClause.Occur.*;
  */
 public class LucenePropertyIndex extends FulltextIndex {
 
+    private static final Logger LOG = LoggerFactory
+            .getLogger(LucenePropertyIndex.class);
+        private static final PerfLogger PERF_LOGGER =
+            new PerfLogger(LoggerFactory.getLogger(LucenePropertyIndex.class.getName() + ".perf"));
 
     private final static long LOAD_DOCS_WARN = Long.getLong("oak.lucene.loadDocsWarn", 30 * 1000L);
     private final static long LOAD_DOCS_STOP = Long.getLong("oak.lucene.loadDocsStop", 3 * 60 * 1000L);
-    private final static boolean NON_LAZY = Boolean.getBoolean("oak.lucene.nonLazyIndex");
+    private final static boolean NON_LAZY = SystemPropertySupplier.create("oak.lucene.nonLazyIndex", true).loggingTo(LOG).get();
     public final static String OLD_FACET_PROVIDER_CONFIG_NAME = "oak.lucene.oldFacetProvider";
     private final static boolean OLD_FACET_PROVIDER = Boolean.getBoolean(OLD_FACET_PROVIDER_CONFIG_NAME);
     public final static String CACHE_FACET_RESULTS_NAME = "oak.lucene.cacheFacetResults";
@@ -206,11 +211,6 @@ public class LucenePropertyIndex extends FulltextIndex {
 
     private static boolean FLAG_CACHE_FACET_RESULTS_CHANGE = true;
 
-    private static final Logger LOG = LoggerFactory
-        .getLogger(LucenePropertyIndex.class);
-    private static final PerfLogger PERF_LOGGER =
-        new PerfLogger(LoggerFactory.getLogger(LucenePropertyIndex.class.getName() + ".perf"));
-
     /**
      * Batch size for fetching results from Lucene queries.
      */