-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
out_forward: fix error of ack handling conflict on stopping with require_ack_response
enabled
#4030
out_forward: fix error of ack handling conflict on stopping with require_ack_response
enabled
#4030
Conversation
When AckHandler fails to collect a response, it eventually yields Results::FAILED with nulls, but ack_check() was not written carefully enough to notice the case. This was the reason why ack_check() somtimes crashed. Fix it by adding nil checks to methods calls. Signed-off-by: Fujimoto Seiji <[email protected]>
In the threaded ack receiving case, we must be sure to check IOError when doing socket operation, in order not to crash on socket closed by another thread. Signed-off-by: Fujimoto Seiji <[email protected]>
Signed-off-by: Daijiro Fukuda <[email protected]>
The test added in this PR seems to be unstable. I will check it. |
I checked this failing test and I found another conflict that we should take care of.
|
Signed-off-by: Daijiro Fukuda <[email protected]>
Signed-off-by: Daijiro Fukuda <[email protected]>
Signed-off-by: Daijiro Fukuda <[email protected]>
I have made additional fixes. |
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.
LGTM
I commented a nitpick.
Signed-off-by: Daijiro Fukuda <[email protected]>
Thanks! |
Thanks for your review! |
require_ack_response
enabledrequire_ack_response
enabled
Which issue(s) this PR fixes:
Fixes #3962
What this PR does / why we need it:
out_forward
has a thread always checking the ack and closing the socket.fluentd/lib/fluent/plugin/out_forward.rb
Line 512 in e89092c
When stopping Fluentd, some other threads try to do it at the same time.
fluentd/lib/fluent/plugin/out_forward.rb
Line 347 in e89092c
fluentd/lib/fluent/plugin/out_forward.rb
Line 376 in e89092c
This somtimes causes errors.
Although these errors are harmless (at least as far as I can confirm), we should fix this.
This fixes 2 points.
ForwardOutput::ach_check()
.AckHandler::collect_response()
can be nil was lacking from before.The logs will change as follows.
Docs Changes:
Not needed.
Release Note:
Same with the title.