QueryStream multiple ingesters via the streaming interface and returns big ol' set of chunks.
(ctx context.Context, from, to model.Time, partialDataEnabled bool, matchers ...*labels.Matcher)
| 55 | |
| 56 | // QueryStream multiple ingesters via the streaming interface and returns big ol' set of chunks. |
| 57 | func (d *Distributor) QueryStream(ctx context.Context, from, to model.Time, partialDataEnabled bool, matchers ...*labels.Matcher) (*ingester_client.QueryStreamResponse, error) { |
| 58 | var result *ingester_client.QueryStreamResponse |
| 59 | err := instrument.CollectedRequest(ctx, "Distributor.QueryStream", d.queryDuration, instrument.ErrorCode, func(ctx context.Context) error { |
| 60 | req, err := ingester_client.ToQueryRequest(from, to, matchers) |
| 61 | if err != nil { |
| 62 | return err |
| 63 | } |
| 64 | |
| 65 | replicationSet, err := d.GetIngestersForQuery(ctx, matchers...) |
| 66 | if err != nil { |
| 67 | return err |
| 68 | } |
| 69 | |
| 70 | result, err = d.queryIngesterStream(ctx, replicationSet, req, partialDataEnabled) |
| 71 | if err != nil { |
| 72 | return err |
| 73 | } |
| 74 | |
| 75 | if s := opentracing.SpanFromContext(ctx); s != nil { |
| 76 | s.LogKV("chunk-series", len(result.GetChunkseries())) |
| 77 | } |
| 78 | return nil |
| 79 | }) |
| 80 | return result, err |
| 81 | } |
| 82 | |
| 83 | // GetIngestersForQuery returns a replication set including all ingesters that should be queried |
| 84 | // to fetch series matching input label matchers. |
nothing calls this directly
no test coverage detected