jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1494661 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Date Wed, 19 Jun 2013 15:43:39 GMT
Author: mduerig
Date: Wed Jun 19 15:43:39 2013
New Revision: 1494661

URL: http://svn.apache.org/r1494661
Log:
OAK-877: Generating observation events takes too long when intermediate save calls are involved
process full pending queue on each run of the ChangeProcessor

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?rev=1494661&r1=1494660&r2=1494661&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Wed Jun 19 15:43:39 2013
@@ -162,13 +162,15 @@ class ChangeProcessor implements Runnabl
 
         try {
             ChangeSet changes = changeListener.getChanges();
-            if (changes != null &&
-                    !(filterRef.get().excludeLocal() && changes.isLocal(observationManager.getContentSession())))
{
-                EventGeneratingNodeStateDiff diff = new EventGeneratingNodeStateDiff(changes);
-                changes.diff(VisibleDiff.wrap(diff));
-                if (!stopping) {
-                    diff.sendEvents();
+            while (changes != null) {
+                if (!(filterRef.get().excludeLocal() && changes.isLocal(observationManager.getContentSession())))
{
+                    EventGeneratingNodeStateDiff diff = new EventGeneratingNodeStateDiff(changes);
+                    changes.diff(VisibleDiff.wrap(diff));
+                    if (!stopping) {
+                        diff.sendEvents();
+                    }
                 }
+                changes = changeListener.getChanges();
             }
         } catch (Exception e) {
             log.error("Unable to generate or send events", e);



Mime
View raw message