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 al...@apache.org on 2014/04/29 12:58:25 UTC

svn commit: r1590949 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java

Author: alexparvulescu
Date: Tue Apr 29 10:58:24 2014
New Revision: 1590949

URL: http://svn.apache.org/r1590949
Log:
OAK-1777 Stats for the async indexing don't report 'done' status when there are no changes

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java?rev=1590949&r1=1590948&r2=1590949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java Tue Apr 29 10:58:24 2014
@@ -181,8 +181,6 @@ public class AsyncIndexUpdate implements
                 if (switchOnSync) {
                     reindexedDefinitions.addAll(indexUpdate
                             .getReindexedDefinitions());
-                } else {
-                    postAsyncRunStatsStatus(indexStats);
                 }
             } else if (switchOnSync) {
                 log.debug("No changes detected after diff, will try to switch to synchronous updates on "
@@ -204,7 +202,6 @@ public class AsyncIndexUpdate implements
                     store.merge(builder, newCommitHook(name, state),
                             CommitInfo.EMPTY);
                     reindexedDefinitions.clear();
-                    postAsyncRunStatsStatus(indexStats);
                 } catch (CommitFailedException e) {
                     if (e != CONCURRENT_UPDATE) {
                         exception = e;
@@ -212,6 +209,7 @@ public class AsyncIndexUpdate implements
                 }
             }
         }
+        postAsyncRunStatsStatus(indexStats);
 
         if (exception != null) {
             if (!failing) {