Skip to content

Conversation

@na--
Copy link
Contributor

@na-- na-- commented Dec 16, 2024

What this PR does / why we need it:

Tiny data race in the tests itself, without this fix the tests (when executed with -race) fail with:

WARNING: DATA RACE
Read at 0x00c00187a6a8 by goroutine 10064:
  github.com/grafana/loki/v3/pkg/distributor.TestDistributorPushToKafka.func3.1()
      github.com/grafana/loki/v3/pkg/distributor/distributor_test.go:586 +0x48
  github.com/stretchr/testify/assert.Eventually.func1()
      github.com/stretchr/testify@v1.10.0/assert/assertions.go:1949 +0x33

Previous write at 0x00c00187a6a8 by goroutine 9930:
  github.com/grafana/loki/v3/pkg/distributor.(*mockIngester).Push()
      github.com/grafana/loki/v3/pkg/distributor/distributor_test.go:1872 +0x3c4
  github.com/grafana/loki/v3/pkg/distributor.(*Distributor).sendStreamsErr()
      github.com/grafana/loki/v3/pkg/distributor/distributor.go:1035 +0x3af
...
@na-- na-- requested a review from a team as a code owner December 16, 2024 08:30
@na-- na-- merged commit b8168a8 into main Dec 16, 2024
60 checks passed
@na-- na-- deleted the ned/fix-data-race-03 branch December 16, 2024 10:07
mveitas pushed a commit to mveitas/loki that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants