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
Data dropped without error report in Async mode #80
Comments
The later version silently drops all data if it cannot connect. fluent/fluent-logger-golang#80
Currently, we have two modes to:
And those two modes are used on different expectations on whether it blocks main code processing (or not), and on whether it consumes memory (or not).
This new mode has a different expectation, so I think we should NOT update Async mode, but should add a different mode to work as described above. |
I think you should add a column whether the caller is notified of data drops - this was what I found most surprising. My proposal does not consume any more memory than the queue limit already allows, e.g. if consumer is working but much slower than producer. |
IIUC, we can't unshift objects into golang channels. @bboreham Is this what you proposed accurately? |
And, even if we have retries for message transferring failures in Async mode, we can't return errors to the caller because pushing messages into the channel succeeded. Message transferring will be processed asynchronously, so caller can't know the result of message transferring. |
You can have one popped item which you retry sending and a queue of items in the chan to follow. |
I have a similar use case. Here is a PR that attempts to give the users of this library the flexibility to resend messages/handle errors when using async - #97 It does not break the expectations you mentioned above @tagomoris if you don't want to use the callback. |
@ivan-valkov That looks like a smart solution! I'll review the change a little later. |
I see a lot of this in my logs:
no records are sent, no errors are returned.
I think it would be better to leave the data in the
pending
queue until reconnection is achieved.The text was updated successfully, but these errors were encountered: