Ignore individual options for out copy#303
Conversation
it will only raise an exception if all outputs fail.
Uses a fault tolerant output chain to only fail if all outputs fail.
There was a problem hiding this comment.
Fluentd code uses ! instead of not.
Ah, also || is popular than or in fluentd.
There was a problem hiding this comment.
Please add :error_class => e.class.to_s.
I am considering buffer error handling improvement. |
|
@repeatedly implemented in #306 |
|
btw, you mentioned you were working on streaming errors to another plugin, that sounds like a very good idea, will it be based on |
|
@dterror It is based on new Engine routing. We need more time to apply this change to current version. |
There was a problem hiding this comment.
Do not rescue Exception. Exception is super base class of ruby's error including NoMemoryError, SyntaxError. rescue => e should be fine.
|
After review the code, I have one idea. Or specifying plugin id like |
There was a problem hiding this comment.
e.message and e.to_s are the same, so this is not informative.
$log.error :error_class => e.class.to_s, :error => e.to_s is better
There was a problem hiding this comment.
how about $log.error :error_class => e.class.to_s, :error => e.message? e.message is more semantic than e.to_s imo
Making sure to log all exceptions so that information is not lost.
|
@repeatedly I think that with the implementation of |
|
What does 'general' mean? |
|
I mean it won't need a granular control such as |
|
@dterror I see. But only |
|
They can ignore For example, for my use case in particular I could use: <match foo.bar.*>
type copy
ignore_individual_errors true
<store>
type s3
#...
</store>
<store>
type elasticsearch
#...
</store>
</match>If its okay for either to fail, but not both. OR <match foo.bar.*>
type copy
<store>
type s3
#...
</store>
<store>
type elasticsearch
buffer_ignore_exceeded_chunk true
#...
</store>
</match>If S3 can't to fail. It's my belief that |
Yeah but other error occurs. Hmm, Fluentd's config parameter can accept any type. I will add array support for other use-cases. |
Although I am not familiar with S3 plugin, |
|
Oh, current implementation raises |
The proposal of this PR want to ignore the exception which caused by un-important plugin. This is why I propose |
|
The reason to ignore the exception is (#296)
So, I thought as the ultimate goal of this PR is to create a option not to break the chain. Suppressing to raise errors in each plugin, and raising OutputChainError after all plugins are processed achieves the goal. |
I think no. This behaviour breaks the transaction. Currently, Input plugin assumes |
No, my approach is succeeded (when no plugin fail) or raises an error (when one or some of plugins fails). |
My 'succeeded' means out_copy processes remaining plugins if error occurred. If we select your approach, out_copy should keep failed plugin lists for avoiding log duplication. P.S. |
|
I see your point @repeatedly. Covering more cases does make sense. I'll change the implementation. <match foo.bar.*>
type copy
<store>
type s3
#...
</store>
<store ignore-failure>
type elasticsearch
#...
</store>
</match> |
looks nice for me. |
|
Another one idea. This issue will be resolved by error stream. I'm not sure which is the best... |
|
How long until error stream is out? what will it look like and is there anything I can do help? If that's the 'proper' way to go, I think it's fair to wait. |
|
That is, provided error stream is outlined and is not going to take too long. I still think |
|
In my plan, v1 includes error stream and now working to implement v1 features. |
|
Since it looks |
This addresses #296 by adding a fault-tolerant option to
OutputChain. With this, it will only raise an exception if all configured outputs raise exceptions. Also added theignore_individual_errorsoption toout_copywhich simply changes how it configures itsOutputChain.@repeatedly I'll still implement your idea of
buffer_ignore_exceeded_chunk, but in a different pull-request, is that ok?