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

Report current_offset metric for incomplete partitions #830

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andpol
Copy link

@andpol andpol commented Sep 27, 2024

For consumers of low volume topic-partitions, it can take a very long time for enough offset commits to happen before a partition is marked as "complete".

For the burrow_kafka_consumer_current_offset metric to be reported, only a single committed offset is required.

@andpol andpol requested a review from bai as a code owner September 27, 2024 00:38
For consumers of low volume topic-partitions, it can take a very long
time for enough offset commits to happen before a partition is marked as
"complete".

For the `burrow_kafka_consumer_current_offset` metric to be reported,
only a single committed offset is required.
firstOffset := len(partition.Offsets) - 1
firstOffset := len(partition.Offsets) // defaults to the length, so if all offsets are nil we make an empty slice
Copy link
Author

@andpol andpol Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change, a runtime error: invalid memory address or nil pointer dereference was happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant