lib/storage: correct tagfilter match cost (#1079)

This commit is contained in:
faceair 2021-02-23 03:46:56 +08:00 committed by GitHub
parent fa03e0d210
commit 15d61c4879
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2458,7 +2458,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)
}