(matcher *labels.Matcher)
| 2495 | } |
| 2496 | |
| 2497 | func isRegexUnOptimized(matcher *labels.Matcher) bool { |
| 2498 | if matcher.Type != labels.MatchRegexp { |
| 2499 | return false |
| 2500 | } |
| 2501 | // PostingsForMatchers will optimize .* and .+ matchers, so we don't need to check them. |
| 2502 | if matcher.Value == ".*" || matcher.Value == ".+" { |
| 2503 | return false |
| 2504 | } |
| 2505 | return !matcher.IsRegexOptimized() |
| 2506 | } |
| 2507 | |
| 2508 | // checkRegexMatcherLimits validates regex matchers against configured limits to prevent expensive queries. |
| 2509 | func (i *Ingester) checkRegexMatcherLimits(ctx context.Context, userID string, db *userTSDB, matchers []*labels.Matcher, from, through int64) error { |
no outgoing calls