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 2020/05/26 16:47:32 UTC

svn commit: r1878129 - /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/PersistedLinkedList.java

Author: thomasm
Date: Tue May 26 16:47:32 2020
New Revision: 1878129

URL: http://svn.apache.org/viewvc?rev=1878129&view=rev
Log:
OAK-9093 Reindexing using --doc-traversal-mode may log too much

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/PersistedLinkedList.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/PersistedLinkedList.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/PersistedLinkedList.java?rev=1878129&r1=1878128&r2=1878129&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/PersistedLinkedList.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/PersistedLinkedList.java Tue May 26 16:47:32 2020
@@ -88,14 +88,14 @@ public class PersistedLinkedList impleme
         String s = writer.toString(item);
         map.put(tailIndex++, s);
         size++;
-        long now = System.currentTimeMillis();
-        boolean compactNow = now >= lastCompact + compactStoreMillis;
         long sizeBytes = store.getFileStore().size();
-        if (compactNow || now >= lastLog + 10000) {
+        long now = System.currentTimeMillis();
+        if (now >= lastLog + 10000) {
             LOG.info("Entries: " + size + " map size: " + map.sizeAsLong() + " file size: "
                     + sizeBytes + " bytes");
             lastLog = now;
         }
+        boolean compactNow = now >= lastCompact + compactStoreMillis;
         if (compactNow && sizeBytes > 10L * 1000 * 1000) {
             // compact once a minute, if larger than 10 MB
             LOG.info("Compacting...");