(ctx context.Context, req *tempopb.SearchRequest, _ common.SearchOptions)
| 576 | } |
| 577 | |
| 578 | func (b *walBlock) Search(ctx context.Context, req *tempopb.SearchRequest, _ common.SearchOptions) (*tempopb.SearchResponse, error) { |
| 579 | results := &tempopb.SearchResponse{ |
| 580 | Metrics: &tempopb.SearchMetrics{}, |
| 581 | } |
| 582 | |
| 583 | for i, blockFlush := range b.readFlushes() { |
| 584 | file, err := blockFlush.file(ctx) |
| 585 | if err != nil { |
| 586 | return nil, fmt.Errorf("error opening file %s: %w", blockFlush.path, err) |
| 587 | } |
| 588 | |
| 589 | defer file.Close() |
| 590 | pf := file.parquetFile |
| 591 | |
| 592 | r, err := searchParquetFile(ctx, pf, req, pf.RowGroups(), b.meta.DedicatedColumns) |
| 593 | if err != nil { |
| 594 | return nil, fmt.Errorf("error searching block [%s %d]: %w", b.meta.BlockID.String(), i, err) |
| 595 | } |
| 596 | |
| 597 | results.Traces = append(results.Traces, r.Traces...) |
| 598 | results.Metrics.InspectedBytes += file.r.BytesRead() |
| 599 | results.Metrics.InspectedTraces += uint32(pf.NumRows()) |
| 600 | if len(results.Traces) >= int(req.Limit) { |
| 601 | break |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | return results, nil |
| 606 | } |
| 607 | |
| 608 | func (b *walBlock) SearchTags(ctx context.Context, scope traceql.AttributeScope, cb common.TagsCallback, mcb common.MetricsCallback, _ common.SearchOptions) error { |
| 609 | for i, blockFlush := range b.readFlushes() { |
nothing calls this directly
no test coverage detected