Skip to content
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

Approximate quantile_over_time #10417

Merged
merged 125 commits into from
Dec 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
4ea54f7
Vendor tdigest and ddsketch.
jeschkies Aug 30, 2023
9768704
Make StepEvaluator result generic.
jeschkies Aug 31, 2023
8303daa
Define tdigest batch iterator.
jeschkies Aug 31, 2023
a0b6b55
Try generics.
jeschkies Aug 31, 2023
5127581
Join tdigest vector into a tdigest matrix.
jeschkies Aug 31, 2023
b56cfc2
Start testing.
jeschkies Aug 31, 2023
a15bdc5
Add TDigestEvalExpr and TDigestMergeExpr.
jeschkies Aug 31, 2023
da18856
Define TDigestMergeExpr.
jeschkies Sep 1, 2023
2ab4285
implement interface for quantile sketch, which can be backed by tdigest
cstyan Sep 6, 2023
09dfd87
Merge and evaluate tdigest sketches.
jeschkies Sep 11, 2023
1c45001
Skip optimization.
jeschkies Sep 11, 2023
b052d70
Introduce quantile sketch expr.
jeschkies Sep 11, 2023
f095b02
Parse query before execution.
jeschkies Sep 12, 2023
0f53ba9
Run tests.
jeschkies Sep 12, 2023
bee822d
Use more samples.
jeschkies Sep 12, 2023
a8e1cc4
Correct tests.
jeschkies Sep 12, 2023
2359aac
Create separate test for sketches with relative error.
jeschkies Sep 12, 2023
4d71095
Satisfy linter.
jeschkies Sep 12, 2023
dfaca21
Remove unused code.
jeschkies Sep 12, 2023
e35b769
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Sep 12, 2023
2e053c4
quantile_over_time should be sharded without grouping.
jeschkies Sep 12, 2023
a656d7a
Use constant for "true"
jeschkies Sep 12, 2023
fa92688
Format code.
jeschkies Sep 12, 2023
fe403ca
go mod ...
jeschkies Sep 12, 2023
94923ea
Use StepResult interface instead of generics.
jeschkies Sep 13, 2023
c526f24
Format code.
jeschkies Sep 13, 2023
c27e5c3
Fix remaining tests.
jeschkies Sep 13, 2023
96e0ea2
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Sep 14, 2023
b6023cb
Return parsed query from parameters.
jeschkies Sep 18, 2023
697d5de
Revert "Return parsed query from parameters."
jeschkies Sep 18, 2023
24ed1a4
Introduce __quantile_sketch_over_time__
jeschkies Sep 18, 2023
a600de2
Remove parsed query from parameters again.
jeschkies Sep 18, 2023
be3ba41
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Sep 18, 2023
e4b035c
Move TDigest step evaluator creation into range step evaluator.
jeschkies Sep 19, 2023
8e8246b
Rename step evaluator.
jeschkies Sep 19, 2023
a6d20c3
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Sep 19, 2023
e468e1f
Clean up a little.
jeschkies Sep 19, 2023
c8426b2
Start protobuf support for quantile sketches.
jeschkies Sep 19, 2023
1956623
Define quantile sketch response.
jeschkies Sep 19, 2023
0a80f4e
Serialize qunatile matrix.
jeschkies Sep 19, 2023
3bdcced
Stub quantile matrix deserialization.
jeschkies Sep 19, 2023
e1fede8
Unmarshal tdigest sketch.
jeschkies Sep 20, 2023
8784561
Clean build.
jeschkies Sep 20, 2023
ffa7b6a
Always shard queries.
jeschkies Sep 20, 2023
2ebb71c
Use point receiver.
jeschkies Sep 20, 2023
fde4d6a
Format generated protos.
jeschkies Sep 20, 2023
6fa5680
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Sep 21, 2023
401699e
Merge remote-tracking branch 'refs/remotes/origin/karsten/quantile-ap…
jeschkies Sep 21, 2023
4d1e839
Revert Makefile.
jeschkies Sep 21, 2023
9afab86
Correct generated protos files.
jeschkies Sep 21, 2023
b469eac
Merge branch 'main' into karsten/quantile-approximation
cstyan Oct 18, 2023
f49f269
need to handle error that can be returned by QuantileSketchFromProto
cstyan Oct 18, 2023
098ec7f
move quantile test so there's no import cycle
cstyan Oct 18, 2023
afc9fd3
fix lint issue in tdigest
cstyan Oct 18, 2023
6c8647e
fix import order
cstyan Oct 18, 2023
ffabb0d
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Nov 22, 2023
cdd91a9
Resolve broken merge
jeschkies Nov 22, 2023
6a493d8
Override expression
jeschkies Nov 22, 2023
1180a1e
Remove private expressions
jeschkies Nov 22, 2023
64ba4f0
Clone AST
jeschkies Nov 22, 2023
69818d8
Remove usages of ParseExpr.
jeschkies Nov 22, 2023
299f105
Send AST to ingester as well
jeschkies Nov 22, 2023
2cf808b
Avoid import cycle
jeschkies Nov 23, 2023
8d8a6ea
Pass AST/Plan to ingester
jeschkies Nov 23, 2023
add38d6
Set plan for sample query
jeschkies Nov 23, 2023
ab8dbe1
Pass engine tests
jeschkies Nov 23, 2023
db134f2
Fix multi tenant querier
jeschkies Nov 23, 2023
d9e7f32
Fix querier tests
jeschkies Nov 23, 2023
d2af56d
Fix a few limits test
jeschkies Nov 23, 2023
8b196a0
Fix most roundtrip tests
jeschkies Nov 23, 2023
9aaf295
fix split by interval tests
jeschkies Nov 23, 2023
a4ffcb4
Format protos
jeschkies Nov 23, 2023
ffec435
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Nov 23, 2023
aad5dbc
Satisfy linter
jeschkies Nov 23, 2023
13efa17
Fix storage tests except for catch all
jeschkies Nov 23, 2023
d3d76d4
Satisfy linter
jeschkies Nov 23, 2023
62d6025
Try ingester fix
jeschkies Nov 23, 2023
8a88b4f
Parse expression
jeschkies Nov 24, 2023
6c3f94a
Test frontend with protobuf.
jeschkies Nov 24, 2023
b8e718e
Use custom message
jeschkies Nov 24, 2023
df4f188
Use custom proto message
jeschkies Nov 24, 2023
2fbad9d
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Nov 24, 2023
0f5df0a
Parse matcher
jeschkies Nov 24, 2023
3fe99f8
Do not parse empty query
jeschkies Nov 24, 2023
1e82d45
Do no parse empty matcher string
jeschkies Nov 27, 2023
8f8785b
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Nov 27, 2023
fa81165
Add feature flag
jeschkies Nov 27, 2023
426d4fd
Add changelog entry
jeschkies Nov 27, 2023
2370a73
Rename t-digest
jeschkies Nov 27, 2023
0b98afa
Verify sketches have the same timestamp
jeschkies Nov 27, 2023
0eeaf95
set AST to nil
jeschkies Nov 27, 2023
4010d5f
Handle errors on sketch merge
jeschkies Nov 27, 2023
37dc194
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Nov 27, 2023
0163d8c
Address PR feedback
jeschkies Nov 30, 2023
efa60d8
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Nov 30, 2023
77602d6
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 1, 2023
8cde54e
Pass comma-separated list
jeschkies Dec 1, 2023
0af057c
Fix clone bug
jeschkies Dec 1, 2023
ef88960
Test clone of noop filter
jeschkies Dec 1, 2023
a43581e
Test string label filter clone
jeschkies Dec 1, 2023
3b8a1d5
Check for empty query plan
jeschkies Dec 1, 2023
18e205d
Extract magic number for explain
jeschkies Dec 1, 2023
99a7762
Rename vlaidtion rule
jeschkies Dec 1, 2023
509adc4
Comment why plan can be empty
jeschkies Dec 1, 2023
80788a8
Remove proto option
jeschkies Dec 1, 2023
3a04ac7
Rename sketch models
jeschkies Dec 1, 2023
5e3d04f
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 1, 2023
07f654c
Make doc
jeschkies Dec 1, 2023
f42aed4
Test result to response
jeschkies Dec 1, 2023
a1174df
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 1, 2023
39a5b2f
Test quantile matrix roundtriop
jeschkies Dec 1, 2023
db33dc9
Rename from proto method
jeschkies Dec 1, 2023
db511ad
Test probabilisitc quantile serialization
jeschkies Dec 1, 2023
274a1e1
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 1, 2023
bdc8e1e
Merge branch 'main' into karsten/quantile-approximation
jeschkies Dec 4, 2023
fe9c94a
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 6, 2023
1dc2c81
Update shard aggregations
jeschkies Dec 6, 2023
121db5d
Address some comments
jeschkies Dec 6, 2023
75ad077
Check for empty query plan
jeschkies Dec 6, 2023
c0eaf3d
Test a few error cases
jeschkies Dec 6, 2023
48ebd00
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 6, 2023
fbdd7d6
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 6, 2023
95aba11
Merge branch 'main' into karsten/quantile-approximation
jeschkies Dec 8, 2023
158e10a
Handle empty plan
jeschkies Dec 11, 2023
2572167
Merge remote-tracking branch 'grafana/main' into karsten/quantile-app…
jeschkies Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ func (i *Ingester) QuerySample(req *logproto.SampleQueryRequest, queryServer log
_, ctx := stats.NewContext(queryServer.Context())
sp := opentracing.SpanFromContext(ctx)

// If the plan is empty we want all series to be returned.
Copy link
Contributor

Choose a reason for hiding this comment

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

so if we have a nil plan here it's intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

if req.Plan == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we include comment about how we can end up with a nil plan here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

parsed, err := syntax.ParseSampleExpr(req.Selector)
if err != nil {
Expand Down