grafana / mimir

Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus.
https://grafana.com/oss/mimir/
GNU Affero General Public License v3.0
4.05k stars 515 forks source link

kafka replay speed: upstream partition_offset_reader.go #9448

Closed dimitarvdimitrov closed 1 day ago

dimitarvdimitrov commented 1 day ago

What this PR does

This is the first of series of PRs to upstream the code for improving Kafka replay speed in the ingester.

In this PR I'm upstreaming a tiny change related to partitionOffsetReader. We need caching in the reader so that we can check the start offset of the partition. We don't need that to be very exact because we use it to find out if we're trying to consume from before the start.

Which issue(s) this PR fixes or relates to

Fixes #

Checklist