Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When you implement an ingest factory which implements `Closeable`: ```java public static final class Factory extends AbstractProcessorFactory<MyProcessor> implements Closeable { @OverRide public void close() throws IOException { logger.debug("closing my processor factory"); } } ``` The `close()` method is never called which could lead to some leak threads when we close a node. The `ProcessorsRegistry#close()` method exists though and seems to do the right job: ```java @OverRide public void close() throws IOException { List<Closeable> closeables = new ArrayList<>(); for (Processor.Factory factory : processorFactories.values()) { if (factory instanceof Closeable) { closeables.add((Closeable) factory); } } IOUtils.close(closeables); } ``` But apparently this method is never called in `Node#stop()`. Closes elastic#17625.
- Loading branch information