Merge pull request #123660 from xigang/cacher/watch
cleanup: if triggerValue has a value fast break
This commit is contained in:
@@ -546,6 +546,7 @@ func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions
|
|||||||
if field == c.indexedTrigger.indexName {
|
if field == c.indexedTrigger.indexName {
|
||||||
if value, ok := pred.Field.RequiresExactMatch(field); ok {
|
if value, ok := pred.Field.RequiresExactMatch(field); ok {
|
||||||
triggerValue, triggerSupported = value, true
|
triggerValue, triggerSupported = value, true
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user