Skip to content

Commit e1090e5

Browse files
Merge pull request #14505 from rabbitmq/mergify/bp/v4.1.x/pr-14504
QQ: exclude delivery_limit from policy repair comparison. (backport #14458) (backport #14504)
2 parents b2d2439 + 5e69948 commit e1090e5

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
@@ -753,15 +753,19 @@ system_recover(quorum_queues) ->
753753
end.
754754

755755
maybe_apply_policies(Q, #{config := CurrentConfig}) ->
756-
NewPolicyConfig = gather_policy_config(Q, false),
756+
%% delivery_limit can't be updated from a policy and thus has to be
757+
%% excluded from the comparison
758+
NewPolicyConfig = maps:without([delivery_limit],
759+
gather_policy_config(Q, false)),
757760

758761
RelevantKeys = maps:keys(NewPolicyConfig),
759762
CurrentPolicyConfig = maps:with(RelevantKeys, CurrentConfig),
760763

761764
ShouldUpdate = NewPolicyConfig =/= CurrentPolicyConfig,
762765
case ShouldUpdate of
763766
true ->
764-
?LOG_DEBUG("Re-applying policies to ~ts", [rabbit_misc:rs(amqqueue:get_name(Q))]),
767+
?LOG_DEBUG("Re-applying policies for ~ts",
768+
[rabbit_misc:rs(amqqueue:get_name(Q))]),
765769
policy_changed(Q),
766770
ok;
767771
false -> ok

0 commit comments

Comments
 (0)