From 49ed219e7559ad27588b9ef72bb3c1639e12fba0 Mon Sep 17 00:00:00 2001 From: Wesley Kim Date: Wed, 3 Mar 2021 22:26:28 -0500 Subject: [PATCH] Fixup bug in matchRollupTarget exclude path --- src/metrics/rules/active_ruleset.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/metrics/rules/active_ruleset.go b/src/metrics/rules/active_ruleset.go index 173d47c728..c95b21706e 100644 --- a/src/metrics/rules/active_ruleset.go +++ b/src/metrics/rules/active_ruleset.go @@ -473,7 +473,7 @@ func (as *activeRuleSet) matchRollupTarget( nameTagName = as.tagsFilterOpts.NameTagKey nameTagValue []byte ) - // switch rollupOp. + // Iterate through each tag, looking to match it with corresponding filter tags on the rule matchTag: for hasMoreTags := sortedTagIter.Next(); hasMoreTags; hasMoreTags = sortedTagIter.Next() { tagName, tagVal := sortedTagIter.Current() @@ -528,12 +528,6 @@ matchTag: if opts.generateRollupID { tagPairs = append(tagPairs, metricid.TagPair{Name: tagName, Value: tagVal}) } - - // If one of the target tags is not found in the ID then does not - // need to be excluded. - if res > 0 { - break matchTag - } } }