diff --git a/scripts/docker-integration-tests/query_fanout/warning.sh b/scripts/docker-integration-tests/query_fanout/warning.sh index b29b1b13f1..7bbd56a510 100755 --- a/scripts/docker-integration-tests/query_fanout/warning.sh +++ b/scripts/docker-integration-tests/query_fanout/warning.sh @@ -346,6 +346,54 @@ function test_fanout_warning_graphite { ATTEMPTS=3 TIMEOUT=1 retry_with_backoff find_carbon 9 max_fetch_series_limit_applied } +function verify_range { + RANGE=$1 + PORT=$2 + EXPECTED=$3 + start=$(( $t - 3000 )) + end=$(( $t + 3000 )) + qs="query=sum_over_time($METRIC_NAME[$RANGE])&start=$start&end=$end&step=1s" + query="http://0.0.0.0:$PORT/prometheus/api/v1/query_range?$qs" + curl -sSLg -D $HEADER_FILE "$query" > /dev/null + warn=$(cat $HEADER_FILE | grep M3-Results-Limited | sed 's/M3-Results-Limited: //g') + warn=$(echo $warn | sed 's/ /_/g') + test $warn=$EXPECTED +} + +function test_fanout_warning_range { + t=$(date +%s) + METRIC_NAME="quart_$t" + curl -X POST 0.0.0.0:9003/writetagged -d '{ + "namespace": "agg", + "id": "{__name__=\"'$METRIC_NAME'\",cluster=\"coordinator-cluster-a\",val=\"1\"}", + "tags": [ + { + "name": "__name__", + "value": "'$METRIC_NAME'" + }, + { + "name": "cluster", + "value": "coordinator-cluster-a" + }, + { + "name": "val", + "value": "1" + } + ], + "datapoint": { + "timestamp":'"$t"', + "value": 1 + } + }' + + + ATTEMPTS=3 TIMEOUT=1 retry_with_backoff verify_range 1s 7201 resolution_larger_than_query_range_range:_1s,_resolutions:_5s + ATTEMPTS=3 TIMEOUT=1 retry_with_backoff verify_range 1s 17201 resolution_larger_than_query_range_range:_1s,_resolutions:_5s + + ATTEMPTS=3 TIMEOUT=1 retry_with_backoff verify_range 10s 7201 + ATTEMPTS=3 TIMEOUT=1 retry_with_backoff verify_range 10s 17201 +} + function test_fanout_warning_missing_zone { docker-compose -f ${COMPOSE_FILE} stop coordinator-cluster-c @@ -390,5 +438,6 @@ function test_fanout_warnings { test_fanout_warning_fetch_id_mismatch export GRAPHITE="foo.bar.$t" test_fanout_warning_graphite + test_fanout_warning_range test_fanout_warning_missing_zone } diff --git a/src/query/api/v1/handler/graphite/render_test.go b/src/query/api/v1/handler/graphite/render_test.go index 9a1de559cc..ad55cad93d 100644 --- a/src/query/api/v1/handler/graphite/render_test.go +++ b/src/query/api/v1/handler/graphite/render_test.go @@ -135,7 +135,7 @@ func TestParseQueryResults(t *testing.T) { } meta := block.NewResultMetadata() - meta.Resolutions = []int64{int64(resolution)} + meta.Resolutions = []time.Duration{resolution} fr := &storage.FetchResult{ SeriesList: seriesList, Metadata: meta, @@ -189,7 +189,7 @@ func TestParseQueryResultsMaxDatapoints(t *testing.T) { } meta := block.NewResultMetadata() - meta.Resolutions = []int64{int64(resolution)} + meta.Resolutions = []time.Duration{resolution} fr := &storage.FetchResult{ SeriesList: seriesList, Metadata: meta, @@ -244,7 +244,7 @@ func TestParseQueryResultsMultiTarget(t *testing.T) { } meta := block.NewResultMetadata() - meta.Resolutions = []int64{int64(resolution)} + meta.Resolutions = []time.Duration{resolution} fr := &storage.FetchResult{ SeriesList: seriesList, Metadata: meta, @@ -301,12 +301,12 @@ func TestParseQueryResultsMultiTargetWithLimits(t *testing.T) { } meta := block.NewResultMetadata() - meta.Resolutions = []int64{int64(resolution)} + meta.Resolutions = []time.Duration{resolution} meta.Exhaustive = tt.ex frOne := &storage.FetchResult{SeriesList: seriesList, Metadata: meta} metaTwo := block.NewResultMetadata() - metaTwo.Resolutions = []int64{int64(resolution)} + metaTwo.Resolutions = []time.Duration{resolution} if !tt.ex2 { metaTwo.AddWarning("foo", "bar") } diff --git a/src/query/api/v1/handler/prom/prom.go b/src/query/api/v1/handler/prom/prom.go index 001f1a82da..4a9fa97ea4 100644 --- a/src/query/api/v1/handler/prom/prom.go +++ b/src/query/api/v1/handler/prom/prom.go @@ -25,9 +25,11 @@ import ( "time" "github.com/m3db/m3/src/query/api/v1/options" + "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/storage/prometheus" "github.com/prometheus/prometheus/promql" + "github.com/prometheus/prometheus/promql/parser" ) // NB: since Prometheus engine is not brought up in the usual fashion, @@ -60,3 +62,22 @@ func NewReadInstantHandler(opts Options, hOpts options.HandlerOptions) http.Hand }) return newReadInstantHandler(opts, hOpts, queryable) } + +func applyRangeWarnings( + query string, meta *block.ResultMetadata, +) error { + expr, err := parser.ParseExpr(query) + if err != nil { + return err + } + + parser.Inspect(expr, func(node parser.Node, path []parser.Node) error { + if n, ok := node.(*parser.MatrixSelector); ok { + meta.VerifyTemporalRange(n.Range) + } + + return nil + }) + + return nil +} diff --git a/src/query/api/v1/handler/prom/read.go b/src/query/api/v1/handler/prom/read.go index 6525262846..d04f52fc32 100644 --- a/src/query/api/v1/handler/prom/read.go +++ b/src/query/api/v1/handler/prom/read.go @@ -105,7 +105,8 @@ func (h *readHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { request.Params.End, request.Params.Step) if err != nil { - h.logger.Error("error creating range query", zap.Error(err), zap.String("query", request.Params.Query)) + h.logger.Error("error creating range query", + zap.Error(err), zap.String("query", request.Params.Query)) respondError(w, err, http.StatusInternalServerError) return } @@ -113,13 +114,20 @@ func (h *readHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { res := qry.Exec(ctx) if res.Err != nil { - h.logger.Error("error executing range query", zap.Error(res.Err), zap.String("query", request.Params.Query)) + h.logger.Error("error executing range query", + zap.Error(res.Err), zap.String("query", request.Params.Query)) respondError(w, res.Err, http.StatusInternalServerError) return } - handleroptions.AddWarningHeaders(w, resultMetadata) + query := request.Params.Query + err = applyRangeWarnings(query, &resultMetadata) + if err != nil { + h.logger.Warn("error applying range warnings", + zap.Error(err), zap.String("query", query)) + } + handleroptions.AddWarningHeaders(w, resultMetadata) respond(w, &queryData{ Result: res.Value, ResultType: res.Value.Type(), diff --git a/src/query/api/v1/handler/prom/read_instant.go b/src/query/api/v1/handler/prom/read_instant.go index 53682dce19..f28822b0a8 100644 --- a/src/query/api/v1/handler/prom/read_instant.go +++ b/src/query/api/v1/handler/prom/read_instant.go @@ -102,7 +102,8 @@ func (h *readInstantHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { query, ts) if err != nil { - h.logger.Error("error creating instant query", zap.Error(err), zap.String("query", query)) + h.logger.Error("error creating instant query", + zap.Error(err), zap.String("query", query)) respondError(w, err, http.StatusInternalServerError) return } @@ -110,11 +111,17 @@ func (h *readInstantHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { res := qry.Exec(ctx) if res.Err != nil { - h.logger.Error("error executing instant query", zap.Error(res.Err), zap.String("query", query)) + h.logger.Error("error executing instant query", + zap.Error(res.Err), zap.String("query", query)) respondError(w, res.Err, http.StatusInternalServerError) return } + err = applyRangeWarnings(query, &resultMetadata) + if err != nil { + h.logger.Warn("error applying range warnings", + zap.Error(err), zap.String("query", query)) + } handleroptions.AddWarningHeaders(w, resultMetadata) respond(w, &queryData{ diff --git a/src/query/block/meta.go b/src/query/block/meta.go index 0272b5528a..85bdc98347 100644 --- a/src/query/block/meta.go +++ b/src/query/block/meta.go @@ -22,6 +22,9 @@ package block import ( "fmt" + "sort" + "strings" + "time" "github.com/m3db/m3/src/query/models" ) @@ -64,7 +67,7 @@ type ResultMetadata struct { // incomplete results. Warnings Warnings // Resolutions is a list of resolutions for series obtained by this query. - Resolutions []int64 + Resolutions []time.Duration } // NewResultMetadata creates a new result metadata. @@ -75,7 +78,7 @@ func NewResultMetadata() ResultMetadata { } } -func combineResolutions(a, b []int64) []int64 { +func combineResolutions(a, b []time.Duration) []time.Duration { if len(a) == 0 { if len(b) != 0 { return b @@ -85,7 +88,7 @@ func combineResolutions(a, b []int64) []int64 { return a } - combined := make([]int64, 0, len(a)+len(b)) + combined := make([]time.Duration, 0, len(a)+len(b)) combined = append(combined, a...) combined = append(combined, b...) return combined @@ -158,6 +161,31 @@ func (m ResultMetadata) IsDefault() bool { return m.Exhaustive && m.LocalOnly && len(m.Warnings) == 0 } +// VerifyTemporalRange will verify that each resolution seen is below the +// given step size, adding warning headers if it is not. +func (m *ResultMetadata) VerifyTemporalRange(step time.Duration) { + // NB: this map is unlikely to have more than 2 elements in real execution, + // since these correspond to namespace count. + invalidResolutions := make(map[time.Duration]struct{}, 10) + for _, res := range m.Resolutions { + if res > step { + invalidResolutions[res] = struct{}{} + } + } + + if len(invalidResolutions) > 0 { + warnings := make([]string, 0, len(invalidResolutions)) + for k := range invalidResolutions { + warnings = append(warnings, fmt.Sprintf("%v", time.Duration(k))) + } + + sort.Strings(warnings) + warning := fmt.Sprintf("range: %v, resolutions: %s", + step, strings.Join(warnings, ", ")) + m.AddWarning("resolution larger than query range", warning) + } +} + // AddWarning adds a warning to the result metadata. // NB: warnings are expected to be small in general, so it's better to iterate // over the array rather than introduce a map. diff --git a/src/query/block/meta_test.go b/src/query/block/meta_test.go index 69f01c6c76..9e3f7aa285 100644 --- a/src/query/block/meta_test.go +++ b/src/query/block/meta_test.go @@ -22,6 +22,7 @@ package block import ( "testing" + "time" "github.com/m3db/m3/src/query/models" @@ -104,7 +105,7 @@ func TestMergeIntoEmptyWarnings(t *testing.T) { } func TestMergeResolutions(t *testing.T) { - expected := []int64{1, 2, 3} + expected := []time.Duration{1, 2, 3} r := ResultMetadata{} rTwo := ResultMetadata{} merge := r.CombineMetadata(rTwo) @@ -127,10 +128,37 @@ func TestMergeResolutions(t *testing.T) { require.Equal(t, 3, len(merge.Resolutions)) assert.Equal(t, expected, merge.Resolutions) - rTwo = ResultMetadata{Resolutions: []int64{4, 5, 6}} + rTwo = ResultMetadata{Resolutions: []time.Duration{4, 5, 6}} merge = r.CombineMetadata(rTwo) assert.Equal(t, 3, len(r.Resolutions)) assert.Equal(t, 3, len(rTwo.Resolutions)) require.Equal(t, 6, len(merge.Resolutions)) - assert.Equal(t, []int64{1, 2, 3, 4, 5, 6}, merge.Resolutions) + assert.Equal(t, []time.Duration{1, 2, 3, 4, 5, 6}, merge.Resolutions) +} + +func TestVerifyTemporalRange(t *testing.T) { + r := ResultMetadata{ + Exhaustive: true, + Resolutions: []time.Duration{5, 10}, + } + + ex0 := "resolution larger than query range_range: 1ns, resolutions: 10ns, 5ns" + ex1 := "resolution larger than query range_range: 6ns, resolutions: 10ns" + + r.VerifyTemporalRange(11) + assert.Equal(t, 0, len(r.WarningStrings())) + + r.VerifyTemporalRange(1) + require.Equal(t, 1, len(r.WarningStrings())) + assert.Equal(t, ex0, r.WarningStrings()[0]) + + r.VerifyTemporalRange(6) + require.Equal(t, 2, len(r.WarningStrings())) + assert.Equal(t, ex0, r.WarningStrings()[0]) + assert.Equal(t, ex1, r.WarningStrings()[1]) + + r.VerifyTemporalRange(11) + require.Equal(t, 2, len(r.WarningStrings())) + assert.Equal(t, ex0, r.WarningStrings()[0]) + assert.Equal(t, ex1, r.WarningStrings()[1]) } diff --git a/src/query/functions/temporal/aggregation_test.go b/src/query/functions/temporal/aggregation_test.go index b6d04909d1..9b2612e64f 100644 --- a/src/query/functions/temporal/aggregation_test.go +++ b/src/query/functions/temporal/aggregation_test.go @@ -42,6 +42,19 @@ var aggregationTestCases = []testCase{ {5, 5.5, 6, 6.5, 7, 7, 7, 7, 7, 7}, }, }, + { + name: "avg_over_time with warning", + opType: AvgType, + vals: [][]float64{ + {nan, 1, 2, 3, 4, 0, 1, 2, 3, 4}, + {5, 6, 7, 8, 9, 5, 6, 7, 8, 9}, + }, + expected: [][]float64{ + {nan, 1, 1.5, 2, 2.5, 2, 2, 2, 2, 2}, + {5, 5.5, 6, 6.5, 7, 7, 7, 7, 7, 7}, + }, + withWarning: true, + }, { name: "avg_over_time all NaNs", opType: AvgType, diff --git a/src/query/functions/temporal/base.go b/src/query/functions/temporal/base.go index 915744372c..d9c69d0555 100644 --- a/src/query/functions/temporal/base.go +++ b/src/query/functions/temporal/base.go @@ -117,6 +117,9 @@ func (c *baseNode) Process( sp, ctx := opentracing.StartSpanFromContext(queryCtx.Ctx, c.op.OpType()) defer sp.Finish() + resultMeta := b.Meta().ResultMetadata + resultMeta.VerifyTemporalRange(c.op.duration) + meta := b.Meta() bounds := meta.Bounds if bounds.Duration == 0 { @@ -129,6 +132,7 @@ func (c *baseNode) Process( aggDuration: xtime.UnixNano(c.op.duration), stepSize: xtime.UnixNano(bounds.StepSize), steps: bounds.Steps(), + resultMeta: resultMeta, } concurrency := runtime.NumCPU() @@ -162,6 +166,7 @@ type blockMeta struct { stepSize xtime.UnixNano queryCtx *models.QueryContext steps int + resultMeta block.ResultMetadata } func (c *baseNode) batchProcess( @@ -178,6 +183,7 @@ func (c *baseNode) batchProcess( ) meta := b.Meta() + meta.ResultMetadata = m.resultMeta builder, err := c.controller.BlockBuilder(m.queryCtx, meta, nil) if err != nil { return nil, err @@ -347,6 +353,7 @@ func (c *baseNode) singleProcess( } meta := b.Meta() + meta.ResultMetadata = m.resultMeta builder, err := c.controller.BlockBuilder(m.queryCtx, meta, resultSeriesMeta) if err != nil { return nil, err diff --git a/src/query/functions/temporal/base_test.go b/src/query/functions/temporal/base_test.go index 6e38d0af97..489bd9211d 100644 --- a/src/query/functions/temporal/base_test.go +++ b/src/query/functions/temporal/base_test.go @@ -45,14 +45,43 @@ import ( var nan = math.NaN() type testCase struct { - name string - opType string - vals [][]float64 - expected [][]float64 + name string + opType string + vals [][]float64 + expected [][]float64 + withWarning bool } type opGenerator func(t *testing.T, tc testCase) transform.Params +const expectedWarning = "resolution larger than query range_" + + "range: 1m0s, resolutions: 1h0m0s, 1m1s" + +func buildMetadata() block.ResultMetadata { + resultMeta := block.NewResultMetadata() + resultMeta.Resolutions = []time.Duration{time.Second, time.Minute} + + return resultMeta +} + +func buildWarningMetadata() block.ResultMetadata { + resultMeta := buildMetadata() + resultMeta.Resolutions = append(resultMeta.Resolutions, + time.Second*61, time.Hour) + return resultMeta +} + +func verifyResultMetadata(t *testing.T, m block.ResultMetadata, exWarn bool) { + warnings := m.WarningStrings() + if !exWarn { + assert.Equal(t, 0, len(warnings)) + return + } + + require.Equal(t, 1, len(warnings)) + assert.Equal(t, expectedWarning, warnings[0]) +} + func testTemporalFunc(t *testing.T, opGen opGenerator, tests []testCase) { for _, tt := range tests { for _, runBatched := range []bool{true, false} { @@ -81,11 +110,16 @@ func testTemporalFunc(t *testing.T, opGen opGenerator, tests []testCase) { }, } + resultMeta := buildMetadata() + if tt.withWarning { + resultMeta = buildWarningMetadata() + } + bl := test.NewUnconsolidatedBlockFromDatapointsWithMeta(models.Bounds{ Start: bounds.Start.Add(-2 * bounds.Duration), Duration: bounds.Duration * 2, StepSize: bounds.StepSize, - }, seriesMetas, values, runBatched) + }, seriesMetas, resultMeta, values, runBatched) c, sink := executor.NewControllerWithSink(parser.NodeID(1)) baseOp := opGen(t, tt) @@ -196,6 +230,11 @@ func (it *dummySeriesIter) Close() { } func TestParallelProcess(t *testing.T) { + t.Run("no expected warning", func(t *testing.T) { testParallelProcess(t, false) }) + t.Run("expected warning", func(t *testing.T) { testParallelProcess(t, true) }) +} + +func testParallelProcess(t *testing.T, warning bool) { ctrl := xtest.NewController(t) defer ctrl.Finish() @@ -217,7 +256,13 @@ func TestParallelProcess(t *testing.T) { stepSize := time.Minute bl := block.NewMockBlock(ctrl) + resultMeta := buildMetadata() + if warning { + resultMeta = buildWarningMetadata() + } + bl.EXPECT().Meta().Return(block.Metadata{ + ResultMetadata: resultMeta, Bounds: models.Bounds{ StepSize: stepSize, Duration: stepSize, @@ -300,4 +345,6 @@ func TestParallelProcess(t *testing.T) { require.True(t, found) assert.Equal(t, expected, string(tag)) } + + verifyResultMetadata(t, sink.Meta.ResultMetadata, warning) } diff --git a/src/query/generated/proto/rpcpb/query.pb.go b/src/query/generated/proto/rpcpb/query.pb.go index fc91cf5ccf..d7069a46c9 100644 --- a/src/query/generated/proto/rpcpb/query.pb.go +++ b/src/query/generated/proto/rpcpb/query.pb.go @@ -401,7 +401,8 @@ type FetchOptions struct { Unaggregated FanoutOption `protobuf:"varint,4,opt,name=unaggregated,proto3,enum=rpc.FanoutOption" json:"unaggregated,omitempty"` Aggregated FanoutOption `protobuf:"varint,5,opt,name=aggregated,proto3,enum=rpc.FanoutOption" json:"aggregated,omitempty"` AggregatedOptimized FanoutOption `protobuf:"varint,6,opt,name=aggregatedOptimized,proto3,enum=rpc.FanoutOption" json:"aggregatedOptimized,omitempty"` - IncludeResolution bool `protobuf:"varint,7,opt,name=includeResolution,proto3" json:"includeResolution,omitempty"` + // Deprecated: all requests will include resolution. + IncludeResolution bool `protobuf:"varint,7,opt,name=includeResolution,proto3" json:"includeResolution,omitempty"` } func (m *FetchOptions) Reset() { *m = FetchOptions{} } @@ -7804,109 +7805,110 @@ func init() { } var fileDescriptorQuery = []byte{ - // 1662 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdb, 0x72, 0x1b, 0x49, - 0x19, 0xd6, 0x68, 0xac, 0xd3, 0xaf, 0x83, 0xe5, 0xb6, 0xd9, 0xc8, 0x26, 0x18, 0xd5, 0x00, 0x8b, - 0xf1, 0x06, 0x2b, 0x91, 0xb3, 0x2c, 0x4b, 0x15, 0x07, 0xd9, 0x52, 0x6c, 0xd7, 0xda, 0x92, 0xb7, - 0x35, 0x26, 0x81, 0x82, 0x32, 0xad, 0x51, 0x67, 0x3c, 0x65, 0xcd, 0x61, 0x67, 0x46, 0xcb, 0x3a, - 0xc5, 0x1b, 0x70, 0x43, 0x51, 0x3c, 0x01, 0x14, 0x3c, 0x41, 0x1e, 0x81, 0x0b, 0x2e, 0x79, 0x04, - 0x2a, 0x70, 0xc1, 0x63, 0x6c, 0x75, 0x4f, 0xcf, 0x49, 0x33, 0xae, 0xa4, 0x72, 0x37, 0xff, 0xb9, - 0xff, 0xbf, 0xbf, 0xfe, 0xba, 0x25, 0xf8, 0x99, 0x6e, 0xf8, 0x37, 0xcb, 0xd9, 0x81, 0x66, 0x9b, - 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0xa2, 0x45, 0x3f, 0x61, 0x38, 0x76, 0x16, 0x86, - 0x46, 0xc2, 0x8e, 0x76, 0x33, 0xfb, 0xf5, 0x4b, 0x56, 0xc7, 0xc3, 0x81, 0x1b, 0x8e, 0xfc, 0x95, - 0x53, 0xd8, 0xbe, 0xd7, 0x0d, 0x7d, 0x04, 0x55, 0x8f, 0xea, 0x26, 0x8d, 0x87, 0xba, 0x2e, 0x12, - 0x4f, 0x85, 0x1a, 0x47, 0x0e, 0xca, 0xef, 0x00, 0x62, 0x3d, 0xfa, 0x10, 0xca, 0x26, 0x75, 0x75, - 0x3a, 0x17, 0x78, 0x6d, 0xa5, 0x03, 0xb1, 0xb0, 0xa2, 0x7d, 0xa8, 0x2e, 0x2d, 0xe1, 0x59, 0x4c, - 0xec, 0x5b, 0xec, 0x19, 0xd9, 0x95, 0x3f, 0x4a, 0x50, 0x8b, 0xf4, 0x6c, 0xba, 0x37, 0x94, 0x84, - 0x98, 0xe2, 0xdf, 0x4c, 0xe7, 0x13, 0x63, 0x21, 0x86, 0xcb, 0xbf, 0xd3, 0x48, 0x93, 0x57, 0x91, - 0xf6, 0x10, 0x6a, 0xb3, 0x85, 0xad, 0xdd, 0x4e, 0x8d, 0x57, 0x94, 0xb3, 0x9d, 0x8c, 0x63, 0x05, - 0xda, 0x81, 0xaa, 0x76, 0x43, 0xb5, 0x5b, 0x6f, 0x69, 0xf2, 0x6b, 0xa1, 0x89, 0x23, 0x59, 0xf9, - 0x87, 0x04, 0xcd, 0x29, 0x25, 0x6e, 0xfc, 0x7c, 0x78, 0xba, 0x7a, 0x31, 0xbf, 0xd3, 0xb3, 0x20, - 0x7a, 0x74, 0x14, 0x73, 0x1e, 0x1d, 0x72, 0xfc, 0xe8, 0x78, 0xef, 0xe7, 0xc3, 0x09, 0x34, 0x2f, - 0x0e, 0x55, 0xa2, 0x5f, 0xba, 0xb6, 0x43, 0x5d, 0xff, 0x2e, 0x73, 0x16, 0xb3, 0x38, 0x2b, 0xe6, -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0x6c, - 0xa6, 0x74, 0x02, 0xc5, 0x8f, 0xa1, 0xc4, 0x89, 0x01, 0x25, 0x48, 0x22, 0x0c, 0x40, 0x49, 0x55, - 0xe0, 0xff, 0x58, 0x42, 0x87, 0xec, 0xf9, 0xcb, 0xe8, 0x5a, 0x14, 0x49, 0x5d, 0xb8, 0x3b, 0x9b, - 0x29, 0x5d, 0x14, 0x34, 0x82, 0x46, 0xb2, 0x23, 0xd4, 0xb9, 0x8f, 0x17, 0x76, 0xb6, 0x73, 0x2c, - 0x61, 0x9a, 0xa3, 0x07, 0xff, 0x7a, 0xb3, 0x2b, 0xfd, 0xfb, 0xcd, 0xae, 0xf4, 0x9f, 0x37, 0xbb, - 0xd2, 0x9f, 0xfe, 0xbb, 0x5b, 0xf8, 0x75, 0x89, 0xff, 0x0f, 0x32, 0x2b, 0xf3, 0xff, 0x2d, 0x0e, - 0xbf, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x18, 0x0b, 0xe1, 0x7c, 0x44, 0x11, 0x00, 0x00, + // 1667 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdb, 0x72, 0xe3, 0x48, + 0x19, 0xb6, 0xac, 0xf8, 0xf4, 0xfb, 0x10, 0xa7, 0x13, 0x76, 0x9c, 0x30, 0x04, 0x97, 0x80, 0x25, + 0x64, 0x87, 0x38, 0xe3, 0xcc, 0xb2, 0x2c, 0x55, 0x1c, 0x9c, 0xd8, 0x93, 0xa4, 0x36, 0xb1, 0xb3, + 0x6d, 0x85, 0x19, 0x28, 0xa8, 0xd0, 0x96, 0x7b, 0x14, 0x55, 0xac, 0xc3, 0x4a, 0xf2, 0xb2, 0xd9, + 0xe2, 0x0d, 0xb8, 0xa1, 0x28, 0x9e, 0x00, 0x0a, 0x9e, 0x60, 0x1f, 0x81, 0x0b, 0x2e, 0x79, 0x04, + 0x6a, 0xb8, 0xd9, 0xc7,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0x0b, 0x4c, 0x50, 0x07, 0xa7, 0xe3, 0xc1, 0xe5, 0xa8, 0x2d, + 0xf5, 0xbf, 0x96, 0xa0, 0xc4, 0x5f, 0xd0, 0xe8, 0x29, 0x94, 0x83, 0x5f, 0xea, 0x28, 0xe0, 0xca, + 0xd4, 0xef, 0xf8, 0x9d, 0xcd, 0x94, 0x4e, 0xa0, 0xf8, 0x10, 0x4a, 0x9c, 0x18, 0x50, 0x82, 0x24, + 0xc2, 0x00, 0x94, 0x54, 0x05, 0xfe, 0x87, 0x12, 0x3a, 0x62, 0xcf, 0x5f, 0x46, 0xd7, 0xa2, 0x48, + 0xea, 0xc2, 0xdd, 0xd9, 0x4c, 0xe9, 0xa2, 0xa0, 0x11, 0x34, 0x92, 0x1d, 0xa1, 0xce, 0x43, 0xbc, + 0xb0, 0xb3, 0x9d, 0x63, 0x09, 0xd3, 0x1c, 0x3f, 0xfa, 0xcf, 0xeb, 0x5d, 0xe9, 0xbf, 0xaf, 0x77, + 0xa5, 0xff, 0xbd, 0xde, 0x95, 0xfe, 0xf2, 0xff, 0xdd, 0xc2, 0x6f, 0x4b, 0xfc, 0xbf, 0x90, 0x59, + 0x99, 0xff, 0x77, 0x71, 0xf4, 0x4d, 0x00, 0x00, 0x00, 0xff, 0xff, 0x48, 0x65, 0x25, 0x55, 0x48, + 0x11, 0x00, 0x00, } diff --git a/src/query/generated/proto/rpcpb/query.proto b/src/query/generated/proto/rpcpb/query.proto index a5bb08782f..03abdc82d2 100644 --- a/src/query/generated/proto/rpcpb/query.proto +++ b/src/query/generated/proto/rpcpb/query.proto @@ -61,7 +61,8 @@ message FetchOptions { FanoutOption unaggregated = 4; FanoutOption aggregated = 5; FanoutOption aggregatedOptimized = 6; - bool includeResolution = 7; + // Deprecated: all requests will include resolution. + bool includeResolution = 7 [deprecated=true]; } message RestrictQueryOptions { diff --git a/src/query/graphite/storage/m3_wrapper.go b/src/query/graphite/storage/m3_wrapper.go index 181b8dde60..297440775d 100644 --- a/src/query/graphite/storage/m3_wrapper.go +++ b/src/query/graphite/storage/m3_wrapper.go @@ -229,7 +229,6 @@ func (s *m3WrappedStore) FetchByQuery( // NB: ensure single block return. fetchOptions.BlockType = models.TypeSingleBlock - fetchOptions.IncludeResolution = true fetchOptions.Enforcer = perQueryEnforcer fetchOptions.FanoutOptions = &storage.FanoutOptions{ FanoutUnaggregated: storage.FanoutForceDisable, diff --git a/src/query/graphite/storage/m3_wrapper_test.go b/src/query/graphite/storage/m3_wrapper_test.go index 16deac1284..ac7325e3a3 100644 --- a/src/query/graphite/storage/m3_wrapper_test.go +++ b/src/query/graphite/storage/m3_wrapper_test.go @@ -104,10 +104,10 @@ func buildResult( steps int, start time.Time, ) block.Result { - resos := make([]int64, 0, size) + resos := make([]time.Duration, 0, size) metas := make([]block.SeriesMeta, 0, size) for i := 0; i < size; i++ { - resos = append(resos, int64(resolution)) + resos = append(resos, resolution) metas = append(metas, block.SeriesMeta{Name: []byte(fmt.Sprint("a", i))}) } @@ -188,7 +188,7 @@ func TestFetchByQuery(t *testing.T) { Exhaustive: false, LocalOnly: true, Warnings: []block.Warning{block.Warning{Name: "foo", Message: "bar"}}, - Resolutions: []int64{int64(resolution)}, + Resolutions: []time.Duration{resolution}, } store.EXPECT().FetchBlocks(gomock.Any(), gomock.Any(), gomock.Any()). diff --git a/src/query/remote/codecs.go b/src/query/remote/codecs.go index b499572b52..114e1341b2 100644 --- a/src/query/remote/codecs.go +++ b/src/query/remote/codecs.go @@ -165,8 +165,7 @@ func encodeFetchOptions(options *storage.FetchOptions) (*rpc.FetchOptions, error fanoutOpts := options.FanoutOptions result := &rpc.FetchOptions{ - Limit: int64(options.SeriesLimit), - IncludeResolution: options.IncludeResolution, + Limit: int64(options.SeriesLimit), } unagg, err := encodeFanoutOption(fanoutOpts.FanoutUnaggregated) @@ -464,7 +463,6 @@ func decodeFetchOptions(rpcFetchOptions *rpc.FetchOptions) (*storage.FetchOption } result.SeriesLimit = int(rpcFetchOptions.Limit) - result.IncludeResolution = rpcFetchOptions.GetIncludeResolution() unagg, err := decodeFanoutOption(rpcFetchOptions.GetUnaggregated()) if err != nil { return nil, err @@ -503,6 +501,15 @@ func decodeFetchOptions(rpcFetchOptions *rpc.FetchOptions) (*storage.FetchOption return result, nil } +func encodeResolutions(res []time.Duration) []int64 { + encoded := make([]int64, 0, len(res)) + for _, r := range res { + encoded = append(encoded, int64(r)) + } + + return encoded +} + func encodeResultMetadata(meta block.ResultMetadata) *rpc.ResultMetadata { warnings := make([]*rpc.Warning, 0, len(meta.Warnings)) for _, warn := range meta.Warnings { @@ -515,10 +522,19 @@ func encodeResultMetadata(meta block.ResultMetadata) *rpc.ResultMetadata { return &rpc.ResultMetadata{ Exhaustive: meta.Exhaustive, Warnings: warnings, - Resolutions: meta.Resolutions, + Resolutions: encodeResolutions(meta.Resolutions), } } +func decodeResolutions(res []int64) []time.Duration { + decoded := make([]time.Duration, 0, len(res)) + for _, d := range res { + decoded = append(decoded, time.Duration(d)) + } + + return decoded +} + func decodeResultMetadata(meta *rpc.ResultMetadata) block.ResultMetadata { rpcWarnings := meta.GetWarnings() warnings := make([]block.Warning, 0, len(rpcWarnings)) @@ -532,6 +548,6 @@ func decodeResultMetadata(meta *rpc.ResultMetadata) block.ResultMetadata { return block.ResultMetadata{ Exhaustive: meta.Exhaustive, Warnings: warnings, - Resolutions: meta.GetResolutions(), + Resolutions: decodeResolutions(meta.GetResolutions()), } } diff --git a/src/query/storage/m3/storage.go b/src/query/storage/m3/storage.go index e3a9084a71..9f34c370a6 100644 --- a/src/query/storage/m3/storage.go +++ b/src/query/storage/m3/storage.go @@ -99,11 +99,17 @@ func (s *m3storage) FetchProm( } defer accumulator.Close() - result, _, err := accumulator.FinalResultWithAttrs() + result, attrs, err := accumulator.FinalResultWithAttrs() if err != nil { return storage.PromResult{}, err } + resolutions := make([]time.Duration, 0, len(attrs)) + for _, attr := range attrs { + resolutions = append(resolutions, attr.Resolution) + } + + result.Metadata.Resolutions = resolutions fetchResult, err := storage.SeriesIteratorsToPromResult( result, s.opts.ReadWorkerPool(), @@ -218,15 +224,12 @@ func (s *m3storage) FetchCompressed( span.Finish() } - if options.IncludeResolution { - resolutions := make([]int64, 0, len(attrs)) - for _, attr := range attrs { - resolutions = append(resolutions, int64(attr.Resolution)) - } - - result.Metadata.Resolutions = resolutions + resolutions := make([]time.Duration, 0, len(attrs)) + for _, attr := range attrs { + resolutions = append(resolutions, attr.Resolution) } + result.Metadata.Resolutions = resolutions return result, accumulator.Close, nil } diff --git a/src/query/storage/types.go b/src/query/storage/types.go index 425c41b03e..9321b65fe5 100644 --- a/src/query/storage/types.go +++ b/src/query/storage/types.go @@ -135,9 +135,6 @@ type FetchOptions struct { Enforcer cost.ChainedEnforcer // Scope is used to report metrics about the fetch. Scope tally.Scope - // IncludeResolution if set, appends resolution information to fetch results. - // Currently only used for graphite queries. - IncludeResolution bool // Timeout is the timeout for the request. Timeout time.Duration } diff --git a/src/query/test/builder.go b/src/query/test/builder.go index ef4a40a315..0847fb0304 100644 --- a/src/query/test/builder.go +++ b/src/query/test/builder.go @@ -54,19 +54,20 @@ func NewBlockFromValues( // block using the provided values and metadata. func NewUnconsolidatedBlockFromDatapointsWithMeta( bounds models.Bounds, - meta []block.SeriesMeta, + seriesMetas []block.SeriesMeta, + resultMeta block.ResultMetadata, seriesValues [][]float64, enableBatched bool, ) block.Block { seriesList := make(ts.SeriesList, len(seriesValues)) for i, values := range seriesValues { dps := seriesValuesToDatapoints(values, bounds) - seriesList[i] = ts.NewSeries(meta[i].Name, dps, meta[i].Tags) + seriesList[i] = ts.NewSeries(seriesMetas[i].Name, dps, seriesMetas[i].Tags) } result := &storage.FetchResult{ SeriesList: seriesList, - Metadata: block.NewResultMetadata(), + Metadata: resultMeta, } return newMultiSeriesBlock(result, &storage.FetchQuery{