-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Vector sources acknowledge discarded events #12217
Comments
We could fail to boot a Vector config that has an unconsumed output for a source with acks enabled. |
Another idea courtesy of @binarylogic: we force all possible component errors to be handled explicitly when ack's are enabled. Expanding that some, I think it could look like: all components that can drop events would have a
|
cc/ @hhromic for any thoughts since your discord conversation prompted this discussion 🙂 |
What's a negative ack? |
Ah, for HTTP, this would be something like returning a 400. For sources like |
An alternative UX could be to have the |
Hello all, first of all, thanks for considering the opinion of users. It is highly appreciated :) While checking the documentation again, I stumbled upon the actual place where acknowledgement is properly defined:
More importantly, it also clearly states what happens with dropped events:
Therefore, in terms of documentation/behaviour, Vector seems to just be operating as designed :). I wouldn't classify this issue as a bug but an enhancement or feature request instead. I was previously reading this other documentation page, which seems not so complete as above, and thus raising my questions in Discord: https://vector.dev/docs/about/under-the-hood/architecture/end-to-end-acknowledgements/ That being said, I think good enhancements as proposed are:
So in summary, I think the way to go would be to make sure that transforms that can drop messages to implement a |
Thank you for your valuable input.
For clarification, there are two classes of discarded events: those that are discarded as a normal part of the transform's behavior, like described for dedupe or filter or the like, and those that are discarded as a result of an error. It is the latter that are primarily at issue here while the documentation describes the former. |
@bruceg ah that's a good clarification indeed. Then it looks like we should better define dropped as normal transform operation. |
I think these are where one of @jszwedko's suggestions would come into play, where we would require all outputs to be consumed by another component at a configuration level, in which case they are not dropped at all. |
Yes, indeed. Especially the suggestion about adding configurable ack behaviour to the |
Just updating the status. I realize the lines are blurry here, but I think this is a bug given normal user expectations for this feature. |
I caught this error and the consuming from Kafka totally stopped:
I build from newest master version these days, does it related to this bug? |
Hi @honganan ! What you see there is a change to have Vector avoid acknowledging the event in Kafka if it failed to successfully process it. This change was made to avoid data loss by letting operators intervene to fix the issue that caused the failure. |
After reconsidering this behavior in light of a newly codified UX principle some planned work on error handling, we've decided to revert it for v0.24.0. |
…nts (#14135) We are moving forward on handling processing and delivery errors by alternate means that will no longer require sources to reject events. This halting behavior is surprising to users and causes situations that are difficult to recover from without complicated manual adjustments. As such, we are going to revert this series in order to prevent regressions. This partially reverts the following commits: fix(kafka source): Fix handling of negative acknowledgements (#12901) 2dfa85b fix(journald source): Fix handling of negative acknowledgements (#12913) da11de5 fix(file source): Fix handling of negative acknowledgements (#12936) 4c58422 Ref: #12217 (comment)
That would be good for UX. |
…nts (#14135) We are moving forward on handling processing and delivery errors by alternate means that will no longer require sources to reject events. This halting behavior is surprising to users and causes situations that are difficult to recover from without complicated manual adjustments. As such, we are going to revert this series in order to prevent regressions. This partially reverts the following commits: fix(kafka source): Fix handling of negative acknowledgements (#12901) 2dfa85b fix(journald source): Fix handling of negative acknowledgements (#12913) da11de5 fix(file source): Fix handling of negative acknowledgements (#12936) 4c58422 Ref: #12217 (comment) Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
weird workaround i found for this, use
this will reject all acks (with 500 internal server error for http source) |
When end-to-end acknowledgments are enabled, Vector sources (where possible) are configured to wait until events are successful processed by associated sinks before acknowledging to the client connected to the source.
However, if an event is discarded by the configured topology, the source acknowledges this event as successfully processed. This was the intended implementation, but it is becoming clearer that this is unexpected behavior. As a Vector user, I would not expect these events to be marked as acknowledged.
Vector can discard events early when:
remap
whendrop_on_err = true
)route
)Instead, these should result in negative acknowledgements to the source.
Prompted by https://discord.com/channels/742820443487993987/746070591097798688/964167175923433522
Related: #12109
The text was updated successfully, but these errors were encountered: