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/01/06 10:32:52 UTC

[jackrabbit-oak] branch OAK-10055 created (now bf2832e7c4)

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

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


      at bf2832e7c4 OAK-10055 Auto refreshing IndexTracker every hour causes online reindexing to fail

This branch includes the following new commits:

     new bf2832e7c4 OAK-10055 Auto refreshing IndexTracker every hour causes online reindexing to fail

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[jackrabbit-oak] 01/01: OAK-10055 Auto refreshing IndexTracker every hour causes online reindexing to fail

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bf2832e7c496526c9abcf8dd208b2445a6371aad
Author: Thomas Mueller <th...@apache.org>
AuthorDate: Fri Jan 6 11:32:34 2023 +0100

    OAK-10055 Auto refreshing IndexTracker every hour causes online reindexing to fail
---
 .../apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java b/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java
index a65824d99d..c76e5a5d68 100644
--- a/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java
+++ b/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTracker.java
@@ -65,10 +65,13 @@ import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE
  */
 public class IndexTracker {
 
-    // auto-refresh every hour
+    // auto-refresh
+    // the default is to not refresh (refresh every 100 years)
+    // to refresh every hour, set it to 3600000
+    // we don't use Long.MAX_VALUE to avoid (now + AUTO_REFRESH_MILLIS) to become negative
     private static final long AUTO_REFRESH_MILLIS = Long.getLong(
             "oak.indexTracker.autoRefresh",
-            60 * 60 * 1000);
+            100L * 365 * 24 * 60 * 60 * 1000);
 
     /** Logger instance. */
     private static final Logger log = LoggerFactory.getLogger(IndexTracker.class);