-
Notifications
You must be signed in to change notification settings - Fork 544
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
WIP: Upgrade google.golang.org/grpc to v1.69.0 #10224
base: main
Are you sure you want to change the base?
Conversation
7f962d6
to
5fb5473
Compare
321bc61
to
6be7edd
Compare
6ba3edf
to
ffd51d0
Compare
2c7a283
to
bfb9512
Compare
bfb9512
to
b582568
Compare
This reverts commit 8e90ec1. Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
f9b89fc
to
a79ef47
Compare
@@ -365,8 +329,8 @@ func (d *Distributor) queryIngesterStream(ctx context.Context, replicationSets [ | |||
queryMetrics.IngesterChunksTotal.Add(float64(totalChunks)) | |||
}() | |||
|
|||
hashToChunkseries := map[string]ingester_client.TimeSeriesChunk{} | |||
hashToTimeSeries := map[string]mimirpb.TimeSeries{} | |||
hashToChunkseries := map[string]ingester_client.CustomTimeSeriesChunk{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looked at test TestDistributor_QueryStream_ShouldReturnErrorIfMaxSeriesPerQueryLimitIsReached
since it had a nil pointer dereference, - lot of the other failures are just a bad equality assert on one of the new struct types.
This new
hashToChunkseries
map gets read from before it's written to, without a nil guard, so there's a panic in line 341
key := mimirpb.FromLabelAdaptersToKeyString(series.Labels)
existing := hashToChunkseries[key]
existing.Labels = series.Labels // panic: existing is nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just fixed failures in pkg/distributor/query_test.go. I hadn't noticed that segfault though. I'll try to fix it tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this patch fixes that test, but it looks like there's the same bug below it for the hashToTimeSeries
that is not getting caught by a test.
diff --git a/pkg/distributor/query.go b/pkg/distributor/query.go
index 2b766f30f4..41d83b124f 100644
--- a/pkg/distributor/query.go
+++ b/pkg/distributor/query.go
@@ -337,15 +337,20 @@ func (d *Distributor) queryIngesterStream(ctx context.Context, replicationSets [
for _, batch := range res.chunkseriesBatches {
for _, series := range batch {
key := mimirpb.FromLabelAdaptersToKeyString(series.Labels)
- existing := hashToChunkseries[key]
- existing.Labels = series.Labels
+ if existing, ok := hashToChunkseries[key]; ok {
+ existing.Labels = series.Labels
- numPotentialChunks := len(existing.Chunks) + len(series.Chunks)
- existing.Chunks = ingester_client.AccumulateChunks(existing.Chunks, series.Chunks)
+ numPotentialChunks := len(existing.Chunks) + len(series.Chunks)
+ existing.Chunks = ingester_client.AccumulateChunks(existing.Chunks, series.Chunks)
- deduplicatedChunks += numPotentialChunks - len(existing.Chunks)
- totalChunks += len(series.Chunks)
- hashToChunkseries[key] = existing
+ deduplicatedChunks += numPotentialChunks - len(existing.Chunks)
+ totalChunks += len(series.Chunks)
+ hashToChunkseries[key] = existing
+ } else {
+ // no existing series to dedupe
+ totalChunks += len(series.Chunks)
+ hashToChunkseries[key] = series
+ }
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a simple fix, that just reflects the change in the PR (i.e. that client.TimeSeriesChunk
is wrapped by client.CustomTimeSeriesChunk
). The problem is that the client.CustomTimeSeriesChunk
isn't valid by itself (unlike client.TimeSeriesChunk
), you need to initialize it with a non-nil TimeSeriesChunk
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still think there's a bug not getting caught?
e92b7e1
to
13c99fe
Compare
Signed-off-by: Arve Knudsen <[email protected]>
13c99fe
to
87c6282
Compare
What this PR does
TODO:
storepb.SeriesResponse
in the querier, since it currently leads to huge memory utilization bursts.distributor.receiveResponse
(QueryStreamResponse
unmarshalling, stop holding on to unmarshalling buffer)Which issue(s) this PR fixes or relates to
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.