Index: src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java =================================================================== --- src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java (revision 1700216) +++ src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java (working copy) @@ -795,16 +795,15 @@ static class DefaultMissingIndexProviderStrategy extends MissingIndexProviderStrategy { - private final Set ignore = newHashSet("disabled"); - @Override - public void onMissingIndex(String type, NodeBuilder definition) + public void onMissingIndex(String type, NodeBuilder definition, String name) throws CommitFailedException { - if (ignore.contains(type)) { + if (isDisabled(type)) { return; } throw new CommitFailedException("Async", 2, - "Missing index provider detected for type ["+type+"]"); + "Missing index provider detected for type [" + type + + "] on index [" + name + "]"); } } Index: src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java =================================================================== --- src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java (revision 1700216) +++ src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java (working copy) @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newArrayListWithCapacity; +import static com.google.common.collect.Sets.newHashSet; import static org.apache.jackrabbit.oak.api.Type.BOOLEAN; import static org.apache.jackrabbit.oak.commons.PathUtils.concat; import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.ASYNC_PROPERTY_NAME; @@ -47,6 +48,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; + import org.apache.jackrabbit.oak.api.CommitFailedException; import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.Type; @@ -170,7 +172,7 @@ Editor editor = rootState.provider.getIndexEditor(type, definition, rootState.root, rootState.newCallback(getIndexPath(getPath(), name), shouldReindex)); if (editor == null) { - missingProvider.onMissingIndex(type, definition); + missingProvider.onMissingIndex(type, definition, name); } else if (shouldReindex) { if (definition.getBoolean(REINDEX_ASYNC_PROPERTY_NAME) && definition.getString(ASYNC_PROPERTY_NAME) == null) { @@ -312,8 +314,14 @@ } public static class MissingIndexProviderStrategy { - public void onMissingIndex(String type, NodeBuilder definition) + + private final Set ignore = newHashSet("disabled"); + + public void onMissingIndex(String type, NodeBuilder definition, String name) throws CommitFailedException { + if (isDisabled(type)) { + return; + } // trigger reindexing when an indexer becomes available PropertyState ps = definition.getProperty(REINDEX_PROPERTY_NAME); if (ps != null && ps.getValue(BOOLEAN)) { @@ -320,8 +328,15 @@ // already true, skip the update return; } + log.warn( + "Missing index provider of type [{}], requesting reindex on [{}]", + type, name); definition.setProperty(REINDEX_PROPERTY_NAME, true); } + + boolean isDisabled(String type) { + return ignore.contains(type); + } } public IndexUpdate withMissingProviderStrategy(