elastic / elastic/logstash

Some inputs do not behave well when the run method is called repeatedly.

Open
#4,274 7 comments 0 reactions 0 assignees View on GitHub
design discuss
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

The file input is problematic when run is called more than once, it reopens the files and file handles. In `pipeline.rb` the method `inputworker` will call `plugin.run` if this raises an error the rescue clause will call retry - this calls the `run` method again.

Proposal: We should call a method on the input that puts it in a `re-runnable` state.

Concerns:
- We do not have a consistent API for this. We have new, register, run, stop. We don't have methods specifically to prepare an input for re-run.
- We could make this the responsibility of each input to detect a second call to run and do what is needed to prepare for the next run.
- We are considering a change to layered exception handling. This may change how often a re-run might occur.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.