fix(ruleeng): ensure topic index matched rules evalauted once

This commit is contained in:
Andrew Mayorov 2023-07-21 20:09:17 +02:00 committed by JianBo He
parent 6432c9c8fc
commit 0496038361
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ get_rules_ordered_by_ts() ->
get_rules_for_topic(Topic) ->
[
emqx_rule_index:get_record(M, ?RULE_TOPIC_INDEX)
|| M <- emqx_rule_index:matches(Topic, ?RULE_TOPIC_INDEX)
|| M <- emqx_rule_index:matches(Topic, ?RULE_TOPIC_INDEX, [unique])
].
-spec get_rules_with_same_event(Topic :: binary()) -> [rule()].