-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
On topic data loss offsets are not committed properly #1558
Comments
I have upgraded the job to the latest released
|
This is simply explained by librdkafka being so fast it is reading future messages. |
Changing librdkafka to allow committing older offsets (and identical offsets) is a simple change, but we might want to make it an opt-in configuration for some time to avoid affecting existing users that rely on the current behaviour |
Dup of #1372 |
Description
When there is a data loss in Kafka (say, data is physically deleted from the broker), the existing consumers will have negative lag until they are restarted.
I can see that
librdkafka
probably behaves correctly in a way, that when there are new messages are getting received from the topic even if their offsets are smaller than what the consumer remembers.However, committing offsets doesn't seem to write new "latest" offsets and the lag keeps being reported negative.
This happens at least until the job restarts.
To compare: Java consumers will immediately commit latest offsets and the lag becomes healthy again. It may have something to do with the old discussion about the fact that Java consumers write offsets unconditionally, while
rdkafka
only writes offsets on commit when it detects the change ;)But this issue is more severe because now lags are incorrect, it is hard to reason about what is being processed or not and what happens on restart.
Checklist
Please provide the following information:
0d540ab, possibly latest
The text was updated successfully, but these errors were encountered: