Open pracucci opened 4 months ago
Although it's not a race, I'll put it here, since it's from the same one. In this build we bumped into a flake in the should_not_wait_indefinitely_if_context_is_cancelled_while_fetching_last_produced_offset
:
Another occurrence https://github.com/grafana/mimir/actions/runs/11188014503/job/31106091993?pr=9515
https://github.com/grafana/mimir/actions/runs/11267325901/job/31332271953?pr=9527
```
=================
WARNING: DATA RACE
Write at 0x00c0007927e0 by goroutine 46254:
github.com/twmb/franz-go/pkg/kgo.(*cursor).setOffset()
/__w/mimir/mimir/vendor/github.com/twmb/franz-go/pkg/kgo/source.go:284 +0x7a8
github.com/twmb/franz-go/pkg/kgo.(*cursor).unset()
/__w/mimir/mimir/vendor/github.com/twmb/franz-go/pkg/kgo/source.go:259 +0x765
github.com/twmb/franz-go/pkg/kgo.(*consumer).assignPartitions()
/__w/mimir/mimir/vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go:1025 +0x757
github.com/twmb/franz-go/pkg/kgo.(*Client).RemoveConsumePartitions()
/__w/mimir/mimir/vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go:874 +0x544
github.com/grafana/mimir/pkg/storage/ingest.(*PartitionReader).switchToOngoingFetcher()
/__w/mimir/mimir/pkg/storage/ingest/reader.go:280 +0x3a4
github.com/grafana/mimir/pkg/storage/ingest.(*PartitionReader).run()
/__w/mimir/mimir/pkg/storage/ingest/reader.go:236 +0x3e
github.com/grafana/mimir/pkg/storage/ingest.(*PartitionReader).run-fm()
These last occurrences include some races in franz-go and some races in using the testing.T.Log
. I opened a PR to fix the latter https://github.com/grafana/mimir/pull/9579
I've just seen a race condition reported by
TestPartitionReader_ConsumeAtStartup
(CI):