@Override public void run(IndexingContext target) throws IOException { // TODO igorf guard against concurrent configuration changes // it is possible that Repository and/or target IndexingContext configuration have changed // and temporary context is populated based contains old/stale configuration // need to detect when this happens based on target timestamp for example and skip replace if (target != null) { target.replace(temporary.getIndexDirectory()); } else { log.warn("Could not perform index operation on repository {}", repository.getId(), new Exception()); } } });
updateRequest.getIndexingContext().replace( directory );
context.replace( tmpContext.getIndexDirectory() );
context.replace( tmpContext.getIndexDirectory() );
context.replace( tmpContext.getIndexDirectory() );
updateRequest.getIndexingContext().replace( directory, rootGroups, allGroups );
context.replace( tmpContext.getIndexDirectory() );
updateRequest.getIndexingContext().replace( directory, rootGroups, allGroups );