From 08c5549055aca8426ee3820b62345d74a4f24f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0tibran=C3=BD?= Date: Thu, 30 Jan 2020 15:00:32 +0100 Subject: [PATCH] Document that NewMergeSeriesSet expects individual sets to be sorted. (#6718) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- storage/fanout.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/fanout.go b/storage/fanout.go index b4746a74c..d8f87cf5c 100644 --- a/storage/fanout.go +++ b/storage/fanout.go @@ -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]