Author: mduerig
Date: Wed Mar 12 11:38:33 2014
New Revision: 1576701
URL: http://svn.apache.org/r1576701
Log:
OAK-1497: JackrabbitEvent#isExternal() returns true for internal changes for
slow listeners
Log warning on full revision queue
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java?rev=1576701&r1=1576700&r2=1576701&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java
Wed Mar 12 11:38:33 2014
@@ -51,6 +51,8 @@ import org.slf4j.LoggerFactory;
* to just one change.
*/
public class BackgroundObserver implements Observer, Closeable {
+ private static final Logger LOG =
LoggerFactory.getLogger(BackgroundObserver.class);
+
/**
* Signal for the background thread to stop processing changes.
*/
@@ -213,7 +215,11 @@ public class BackgroundObserver implemen
// Try to add this change to the queue without blocking, and
// mark the queue as full if there wasn't enough space
+ boolean wasFull = full;
full = !queue.offer(change);
+ if (full && !wasFull) {
+ LOG.warn("Revision queue is full. Further revisions will be
compacted.");
+ }
if (!full) {
// Keep track of the last change added, so we can do the