Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Fix concurrent use of LabelValuesRequest and LabelNamesRequest #670

Merged
merged 1 commit into from
May 8, 2023

Conversation

kolesnikovae
Copy link
Contributor

@kolesnikovae kolesnikovae commented May 8, 2023

It was reported that querier panics on LabelNames request. A sample stack trace:

2023-05-08T15:11:38Z	fatal error: concurrent map writes
2023-05-08T15:11:38Z	
2023-05-08T15:11:38Z	goroutine 8627 [running]:
2023-05-08T15:11:38Z	github.com/bufbuild/connect-go.(*connectClient).WriteRequestHeader(0xc0002b6980, 0x0, 0x479b09?)
2023-05-08T15:11:38Z		github.com/bufbuild/connect-go@v1.4.1/protocol_connect.go:248 +0x1b8
2023-05-08T15:11:38Z	github.com/bufbuild/connect-go.NewClient[...].func2(0xc000ccd3b0)
2023-05-08T15:11:38Z		github.com/bufbuild/connect-go@v1.4.1/client.go:102 +0x12c
2023-05-08T15:11:38Z	github.com/bufbuild/connect-go.(*Client[...]).CallUnary(0x2bb5a12?, {0x4a7e820?, 0xc0005ba900?}, 0x40a7cd?)
2023-05-08T15:11:38Z		github.com/bufbuild/connect-go@v1.4.1/client.go:121 +0x50
2023-05-08T15:11:38Z	github.com/grafana/phlare/api/gen/proto/go/ingester/v1/ingesterv1connect.(*ingesterServiceClient).LabelNames(0x18f73bba00000000?, {0x4a7e820?, 0xc0005ba900?}, 0x0?)
2023-05-08T15:11:38Z		github.com/grafana/phlare/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.go:126 +0x3a
2023-05-08T15:11:38Z	github.com/grafana/phlare/pkg/querier.(*Querier).LabelNames.func1({0x4a7e820?, 0xc0005ba900?}, {0x7f7b557bef98?, 0xc0019a5230?})
2023-05-08T15:11:38Z		github.com/grafana/phlare/pkg/querier/querier.go:168 +0x3e
2023-05-08T15:11:38Z	github.com/grafana/phlare/pkg/querier.forGivenIngesters[...].func1(0xc0003249e0)
2023-05-08T15:11:38Z		github.com/grafana/phlare/pkg/querier/ingester_querier.go:66 +0xa3
2023-05-08T15:11:38Z	github.com/grafana/dskit/ring.ReplicationSet.Do.func1(0xfd993d00fd8922?, 0xc0003249e0)
2023-05-08T15:11:38Z		github.com/grafana/dskit@v0.0.0-20230120165636-649501dde2ca/ring/replication_set.go:62 +0x1ae
2023-05-08T15:11:38Z	created by github.com/grafana/dskit/ring.ReplicationSet.Do
2023-05-08T15:11:38Z		github.com/grafana/dskit@v0.0.0-20230120165636-649501dde2ca/ring/replication_set.go:50 +0x2ba
2023-05-08T15:11:38Z

@kolesnikovae kolesnikovae requested a review from simonswine May 8, 2023 15:54
Copy link
Contributor

@Rperry2174 Rperry2174 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kolesnikovae kolesnikovae enabled auto-merge (squash) May 8, 2023 16:05
@kolesnikovae kolesnikovae merged commit 66f78a9 into main May 8, 2023
@kolesnikovae kolesnikovae deleted the fix/eliminate-concurrent-request-use branch May 8, 2023 16:05
@kolesnikovae kolesnikovae mentioned this pull request May 30, 2023
4 tasks
simonswine pushed a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants