Document that NewMergeSeriesSet expects individual sets to be sorted. (#6718)

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
This commit is contained in:
Peter Štibraný 2020-01-30 15:00:32 +01:00 committed by GitHub
parent 17d8c49919
commit 08c5549055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -388,6 +388,8 @@ type mergeSeriesSet struct {
// NewMergeSeriesSet returns a new series set that merges (deduplicates)
// series returned by the input series sets when iterating.
// Each input series set must return its series in labels order, otherwise
// merged series set will be incorrect.
func NewMergeSeriesSet(sets []SeriesSet, querier *mergeQuerier) SeriesSet {
if len(sets) == 1 {
return sets[0]