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 ca...@apache.org on 2019/04/24 07:54:02 UTC
svn commit: r1858032 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java
Author: catholicon
Date: Wed Apr 24 07:54:02 2019
New Revision: 1858032
URL: http://svn.apache.org/viewvc?rev=1858032&view=rev
Log:
OAK-8258: Active deletion can delete blobs despite indexing cycle deleting them failed
Setup indexing failed flag after merge completes successfully instead of
catching a class of exception - this should be more resilient in other
kind of failures while indexing.
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=1858032&r1=1858031&r2=1858032&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 Wed Apr 24 07:54:02 2019
@@ -716,7 +716,7 @@ public class AsyncIndexUpdate implements
// task will take care of it
taskSplitter.maybeSplit(beforeCheckpoint, callback.lease);
IndexUpdate indexUpdate = null;
- boolean indexingFailed = false;
+ boolean indexingFailed = true;
try {
NodeBuilder builder = store.getRoot().builder();
@@ -772,6 +772,8 @@ public class AsyncIndexUpdate implements
}
mergeWithConcurrencyCheck(store, validatorProviders, builder, beforeCheckpoint,
callback.lease, name);
+ indexingFailed = false;
+
if (indexUpdate.isReindexingPerformed()) {
log.info("[{}] Reindexing completed for indexes: {} in {} ({} ms)",
name, indexUpdate.getReindexStats(),
@@ -780,9 +782,6 @@ public class AsyncIndexUpdate implements
}
corruptIndexHandler.markWorkingIndexes(indexUpdate.getUpdatedIndexPaths());
- } catch (Exception e) {
- indexingFailed = true;
- throw e;
} finally {
if (indexUpdate != null) {
if ( !indexingFailed ) {