Skip to content

[BUG] Consumer group overview fails when ListOffsets returns LEADER_NOT_AVAILABLE #2573

Description

@ngyngcphu

The consumer group overview fails when Redpanda Console calculates consumer lag and ListOffsets returns a partial LEADER_NOT_AVAILABLE error.
This seems similar to issue #2327, where LISTENER_NOT_FOUND causes the same code path to fail. In both cases, one partition cannot return an end offset while the remaining partitions are still healthy.

Environment

  • Redpanda Console: current master branch
  • Deployment mode: Kubernetes
  • Kafka cluster: 3 brokers
  • One broker unavailable, example:
kafka-cluster-1-0-vxh5k  0/1  Init:ImagePullBackOff
kafka-cluster-1-1-xr9zv  1/1  Running
kafka-cluster-1-2-g8zrs  1/1  Running

What happened

Image

Console logs:

failed to list end offsets from some shards request ListOffsets has 1 separate shard errors, first: LEADER_NOT_AVAILABLE: There is no leader for this topic-partition as we are in the middle of a leadership election.

In my setup, one broker is unavailable. Topics with a replication factor of 1 that were hosted on that broker no longer have a leader because a new leader cannot be elected, example:

Topic: test_dash Partition: 0 Leader: none Replicas: 0 Isr: 0

Console calculates lag by fetching committed group offsets and then calling ListEndOffsets to fetch partition high watermarks. If one partition cannot return an end offset, Console cannot calculate lag for that partition, but it can still show consumer group data for healthy partitions. The old behavior treats the partial ListEndOffsets/ListOffsets failure as fatal, which can hide the whole consumer group overview.

Expected behavior

Image

Actual behavior

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions