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

[v23.2.x] metrics: fix kafka_max_offset on read replicas #16275

Merged

Conversation

andrwng
Copy link
Contributor

@andrwng andrwng commented Jan 24, 2024

Backport of #16263

CONFLICT:

  • removed the ducktape changes required for the cloud service since that infra isn't in v23.2.x

Fixes #16274

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

Bug Fixes

  • Fixes a bug that would previously cause read replicas to report the wrong value for the redpand_kafka_max_offset metric.

CONFLICT:
- cloud service implementation didn't exist in this version

Updates the filter used when collecting metrics samples.

In some cases, the samples take the form:

Sample(name='redpanda_kafka_max_offset', labels={'redpanda_namespace': 'kafka', 'redpanda_partition': '5', 'redpanda_topic': 'panda-topic'}, value=0.0, ...

(cherry picked from commit e567d63)
Read replicas were previously translating their own local log offsets to
return `redpanda_kafka_max_offset` to the metrics endpoint. This is
different from how read replicas calculate the HWM when returning to the
Kafka endpoint, which just goes directly to cloud storage.

This adds the same read replica check that we have in the Kafka layer.

(cherry picked from commit 7e33cc7)
@andrwng andrwng requested review from Lazin and abhijat January 24, 2024 19:00
@andrwng andrwng added this to the v23.2.24 milestone Jan 24, 2024
@abhijat abhijat merged commit 36b6758 into redpanda-data:v23.2.x Jan 25, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants