-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New pipeline might break plugins by calling the register method twice #4851
Comments
Strange I see only 1 call to input register: https://github.com/elastic/logstash/blob/master/logstash-core/lib/logstash/pipeline.rb#L373 And didn't have any error with new pipeline (released 2 months ago now). |
@ebuildy I didn't look into input plugins, but there is a call in the eval here: The stack of the first call:
Can you reproduce the error with the above sample (simple) config? |
To be more precise, the eval creates a new Logstash::OutputDelegator, which then calls the register in the initialize method. It delegates only output and filter plugins. Input plugin just gets initiated directly (
|
Looks like this will be solved in #4763 |
Yep, seems like it. Will it be released as part of 2.2.3?The way I see it, it is a major bug, as it makes at least some core plugins unusable, and in some can even result data loss (for the s3 plugin for example). |
@imriz absolutely. its going to be part of 2.2.3 and 2.3.0 releasing soon. |
Thanks :) |
Fixed in #4763 |
Sample config:
Debug log:
The reason is that the register method is being called twice -
Once in the https://github.com/elastic/logstash/blob/master/logstash-core/lib/logstash/pipeline.rb#L58
and another in
logstash/logstash-core/lib/logstash/pipeline.rb
Line 207 in 592835c
This behaviour was introduced in 028576b (Issue #4340)
This might happen in several other plugins that do logic in the register method.
The text was updated successfully, but these errors were encountered: