You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: api/graphite.go
+7-2
Original file line number
Diff line number
Diff line change
@@ -779,7 +779,13 @@ func (s *Server) executePlan(ctx context.Context, orgId uint32, plan expr.Plan)
779
779
meta.RenderStats.GetTargetsDuration=b.Sub(a)
780
780
meta.StorageStats.Trace(span)
781
781
782
-
out=mergeSeries(out)
782
+
// this map will contain all series that we will feed into the processing chain or generated therein:
783
+
// * fetched series, grouped by their expr.Req, such that expr.FuncGet can find the data it needs and feed it into subsequent expr.GraphiteFunc functions
784
+
// * additional series generated while handling the request (e.g. function processing, normalization), keyed by an empty expr.Req (such that can't be mistakenly picked up by FuncGet)
785
+
// all of these series will need to be returned to the pool once we're done with all processing and have generated our response body, which will happen in plan.Clean()
786
+
data:=make(map[expr.Req][]models.Series)
787
+
788
+
out=mergeSeries(out, data)
783
789
784
790
iflen(metaTagEnrichmentData) >0 {
785
791
fori:=rangeout {
@@ -792,7 +798,6 @@ func (s *Server) executePlan(ctx context.Context, orgId uint32, plan expr.Plan)
792
798
// instead of waiting for all data to come in and then start processing everything, we could consider starting processing earlier, at the risk of doing needless work
793
799
// if we need to cancel the request due to a fetch error
0 commit comments