From b1409a7413de296891e215c34cdf3449004c2ff3 Mon Sep 17 00:00:00 2001 From: faceair Date: Tue, 23 Feb 2021 03:46:56 +0800 Subject: [PATCH] lib/storage: correct tagfilter match cost (#1079) --- lib/storage/index_db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/index_db.go b/lib/storage/index_db.go index 04cf922a7..236ec8f71 100644 --- a/lib/storage/index_db.go +++ b/lib/storage/index_db.go @@ -2483,7 +2483,7 @@ func (is *indexSearch) getMetricIDsForTagFilterSlow(tf *tagFilter, filter *uint6 } // Slow path: need tf.matchSuffix call. ok, err := tf.matchSuffix(suffix) - loopsCount += reMatchCost + loopsCount += tf.matchCost if err != nil { return loopsCount, fmt.Errorf("error when matching %s against suffix %q: %w", tf, suffix, err) }