-
Notifications
You must be signed in to change notification settings - Fork 151
Fix close behavior #90
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
Conversation
lib/logstash/outputs/s3.rb
Outdated
| rescue Exception => ex | ||
| @logger.error('upload_worker unhandled exception', :ex => ex, :backtrace => ex.backtrace) | ||
| raise LogStash::Error, 'S3: uploader thread exited unexpectedly' | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the #upload_worker method we are dealing with the exception, I don't think we need to handle them in this one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I didn't realize that stud task worked this way :) Will remove this block.
4eaccf0 to
f9aa0e5
Compare
lib/logstash/outputs/s3.rb
Outdated
|
|
||
| case file | ||
| when LogStash::ShutdownEvent | ||
| if file.is_a? LogStash::ShutdownEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed that in the first review, I think we should compare with the value of LogStash::SHUTDOWN instead of the class type.
|
Small comment, address it and LGTM to merge. Make sure we rebase off master since there is conflict in this PR. |
f9aa0e5 to
d19c34a
Compare
d19c34a to
9cc32e6
Compare
Before workers did not cleanly shutdown resulting in a potential thread leak.
Also includes the patches in #80 , it makes more sense to merge these together as this patch includes spces.