@Test public void notifyFailedIndexing() throws Exception{ createIndex("foo"); NodeState before = builder.getNodeState(); builder.setProperty("foo", "bar"); NodeState after = builder.getNodeState(); NodeState indexed = hook.processCommit(before, after, CommitInfo.EMPTY); tracker.update(indexed); builder = indexed.builder(); indexed = corruptIndex("/oak:index/foo"); builder = indexed.builder(); builder.setProperty("foo", "bar2"); after = builder.getNodeState(); try { hook.processCommit(before, after, CommitInfo.EMPTY); fail("Indexing should have failed"); } catch (CommitFailedException ignore){ } assertTrue(corruptIndexHandler.getFailingIndexData("async").containsKey("/oak:index/foo")); }
public synchronized void update(final NodeState root) { if (refresh) { this.root = root; close(); refresh = false; log.info("Refreshed the opened indexes"); } else { diffAndUpdate(root); } }
IndexTracker { public synchronized void update(final NodeState root) { if (refresh) { this.root = root; close(); refresh = false; log.info("Refreshed the opened indexes"); } else { diffAndUpdate(root); } } }
IndexTracker { public synchronized void update(final NodeState root) { if (refresh) { this.root = root; close(); refresh = false; log.info("Refreshed the opened indexes"); } else { diffAndUpdate(root); } } IndexTracker();  IndexTracker(IndexCopier cloner);  IndexTracker(LuceneIndexReaderFactory readerFactory);  IndexTracker(LuceneIndexReaderFactory readerFactory, @Nullable NRTIndexFactory nrtFactory); }
IndexTracker { public synchronized void update(final NodeState root) { if (refresh) { this.root = root; close(); refresh = false; log.info("Refreshed the opened indexes"); } else { diffAndUpdate(root); } } IndexTracker();  IndexTracker(IndexCopier cloner);  IndexTracker(LuceneIndexReaderFactory readerFactory);  IndexTracker(LuceneIndexReaderFactory readerFactory, @Nullable NRTIndexFactory nrtFactory); MountInfoProvider getMountInfoProvider(); synchronized void close(); synchronized void update(final NodeState root); void setAsyncIndexInfoService(AsyncIndexInfoService asyncIndexInfoService); AsyncIndexInfoService getAsyncIndexInfoService(); void refresh(); @Nullable LuceneIndexNode acquireIndexNode(String path); @Nullable LuceneIndexDefinition getIndexDefinition(String indexPath); Set<String> getIndexNodePaths(); BadIndexTracker getBadIndexTracker(); NodeState getRoot(); }
IndexTracker { public synchronized void update(final NodeState root) { if (refresh) { this.root = root; close(); refresh = false; log.info("Refreshed the opened indexes"); } else { diffAndUpdate(root); } } IndexTracker();  IndexTracker(IndexCopier cloner);  IndexTracker(LuceneIndexReaderFactory readerFactory);  IndexTracker(LuceneIndexReaderFactory readerFactory, @Nullable NRTIndexFactory nrtFactory); MountInfoProvider getMountInfoProvider(); synchronized void close(); synchronized void update(final NodeState root); void setAsyncIndexInfoService(AsyncIndexInfoService asyncIndexInfoService); AsyncIndexInfoService getAsyncIndexInfoService(); void refresh(); @Nullable LuceneIndexNode acquireIndexNode(String path); @Nullable LuceneIndexDefinition getIndexDefinition(String indexPath); Set<String> getIndexNodePaths(); BadIndexTracker getBadIndexTracker(); NodeState getRoot();  }