Skip to content

Commit 0468483

Browse files
Merge pull request #14504 from rabbitmq/mergify/bp/v4.2.x/pr-14458
QQ: exclude delivery_limit from policy repair comparison. (backport #14458)
2 parents 233c893 + 0236d78 commit 0468483

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,19 @@ system_recover(quorum_queues) ->
770770
end.
771771

772772
maybe_apply_policies(Q, #{config := CurrentConfig}) ->
773-
NewPolicyConfig = gather_policy_config(Q, false),
773+
%% delivery_limit can't be updated from a policy and thus has to be
774+
%% excluded from the comparison
775+
NewPolicyConfig = maps:without([delivery_limit],
776+
gather_policy_config(Q, false)),
774777

775778
RelevantKeys = maps:keys(NewPolicyConfig),
776779
CurrentPolicyConfig = maps:with(RelevantKeys, CurrentConfig),
777780

778781
ShouldUpdate = NewPolicyConfig =/= CurrentPolicyConfig,
779782
case ShouldUpdate of
780783
true ->
781-
?LOG_DEBUG("Re-applying policies to ~ts", [rabbit_misc:rs(amqqueue:get_name(Q))]),
784+
?LOG_DEBUG("Re-applying policies for ~ts",
785+
[rabbit_misc:rs(amqqueue:get_name(Q))]),
782786
policy_changed(Q),
783787
ok;
784788
false -> ok

0 commit comments

Comments
 (0)