Skip to content
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

Rebalances can lead to wrong lag being reported #1308

Open
nachogiljaldo opened this issue Jul 8, 2024 · 0 comments
Open

Rebalances can lead to wrong lag being reported #1308

nachogiljaldo opened this issue Jul 8, 2024 · 0 comments
Labels

Comments

@nachogiljaldo
Copy link

Describe the bug

When commits are not immediate and/or some events can have a relatively high processing time and topics substain a low traffic, it can lead to lag being reported even if events were processed and committed.

Kafka Version

3.6.x

To Reproduce

This test reprocuces the behavior:
https://github.com/nachogiljaldo/kafka-go/blob/do_not_commit_offset_of_not_owned_partitions/reader_test.go#L1184

The situation is:

  • consumer A has partitions 1 and 2
  • consumer A receives msg 1 for partition 2
  • consumer B appears and gets assigned partition 1
  • consumer B receives msg 1 and 2 and commits them
  • consumer A finishes consuming msg 1 and commits it --> offset goes back to 1, but consumer B does not know it, so it keeps on asking for offset 2

Expected Behavior

There are 2 things I would expect:

  • committing a message for a partition that is not assigned to the current consumer fails
  • if that happens, we read all events that now became uncommited but that doesn't happen either

Observed Behavior

We do not get the missing message which leads to a fake lag when the traffic has little traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 participant