func (q *mergeQuerier) Select(params *SelectParams, matchers ...*labels.Matcher) (SeriesSet, Warnings, error) {
	seriesSets := make([]SeriesSet, 0, len(q.queriers))
	var warnings Warnings
	for _, querier := range q.queriers {
		set, wrn, err := querier.Select(params, matchers...)
		q.setQuerierMap[set] = querier
		if wrn != nil {
			warnings = append(warnings, wrn...)
		}
		if err != nil {
			q.failedQueriers[querier] = struct{}{}
			// If the error source isn't the primary querier, return the error as a warning and continue.
			if querier != q.primaryQuerier {
				warnings = append(warnings, err)
				continue
			} else {
				return nil, nil, err
			}
		}
		seriesSets = append(seriesSets, set)
	}
	return NewMergeSeriesSet(seriesSets, q), warnings, nil
}
func (q *mergeQuerier) Select(params *SelectParams, matchers ...*labels.Matcher) (SeriesSet, Warnings, error) {
	seriesSets := make([]SeriesSet, 0, len(q.queriers))
	var warnings Warnings
	for _, querier := range q.queriers {
		set, wrn, err := querier.Select(params, matchers...)
		q.setQuerierMap[set] = querier
		if wrn != nil {
			warnings = append(warnings, wrn...)
		}
		if err != nil {
			q.failedQueriers[querier] = struct{}{}
			// If the error source isn't the primary querier, return the error as a warning and continue.
			if querier != q.primaryQuerier {
				warnings = append(warnings, err)
				continue
			} else {
				return nil, nil, err
			}
		}
		seriesSets = append(seriesSets, set)
	}
	return NewMergeSeriesSet(seriesSets, q), warnings, nil
}
func ( q * mergeQuerier ) Select ( params * SelectParams , matchers ... * labels . Matcher ) ( SeriesSet , Warnings , error ) { seriesSets := make ( [ ] SeriesSet , 0 , len ( q . queriers ) ) var warnings Warnings for _ , querier := range q . queriers { set , wrn , err := querier . Select ( params , matchers ... ) q . setQuerierMap [ set ] = querier if wrn != nil { warnings = append ( warnings , wrn ... ) } if err != nil { q . failedQueriers [ querier ] = struct { } { } // If the error source isn't the primary querier, return the error as a warning and continue. if querier != q . primaryQuerier { warnings = append ( warnings , err ) continue } else { return nil , nil , err } } seriesSets = append ( seriesSets , set ) } return NewMergeSeriesSet ( seriesSets , q ) , warnings , nil }
// Select returns a set of series that matches the given label matchers.
Select returns a set of series that matches the given label matchers .