Skip to content

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.

// Slice the offsets to remove all nil entries (they'll be at the start)
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