Author: chetanm
Date: Thu Sep 15 07:18:17 2016
New Revision: 1760855

URL: http://svn.apache.org/viewvc?rev=1760855&view=rev
Log:
OAK-4412 - Lucene hybrid index

Add warning log when queue is full and documents need to be dropped

Modified:
    
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java

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=1760855&r1=1760854&r2=1760855&view=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
 Thu Sep 15 07:18:17 2016
@@ -29,8 +29,11 @@ import org.apache.jackrabbit.oak.spi.sta
 import org.apache.jackrabbit.oak.stats.MeterStats;
 import org.apache.jackrabbit.oak.stats.StatisticsProvider;
 import org.apache.jackrabbit.oak.stats.StatsOptions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LocalIndexObserver implements Observer{
+    private final Logger log = LoggerFactory.getLogger(getClass());
     private final DocumentQueue docQueue;
     private final MeterStats added;
     private final MeterStats dropped;
@@ -71,5 +74,9 @@ public class LocalIndexObserver implemen
 
         added.mark(addedCount);
         dropped.mark(droppedCount);
+        if (droppedCount > 0){
+            //TODO Ensure that log do not flood
+            log.warn("Dropped [{}] docs from indexing as queue is full", 
droppedCount);
+        }
     }
 }


Reply via email to